Jump to content
Developer Wiki and Function Reference Links ×

Attach record


VvierA

Recommended Posts

Hello everybody,

with the kind help of Marissa and the forum I managed to create a working network.

 

There is a pop-up list at the beginning to choose between some options, for example 'timber, concrete, glass'.

Now I'd like to attach the name of the chosen option to a record field, for example create a record format 'custom object' with the field name 'material' and attach the chosen option 'timber'.

 

I've found some nodes (i.e. create field) that seem to be helpful but I didn't find an example on how to use them the right way...

And I was also wondering how to get the name of the chosen option of the pop-up list. I don't know how to do this, because the result of the node popup is just a integer number that represents just the position of the option in the list.

 

Does anybody know of some examples or can anybody help me with some hints?

 

Thank you

VvierA

Link to comment
  • Marionette Maven

Here's a quick example - I included a custom Popup node (I'll look into modifying the one we have in our Default Content for easier use)

 

You may not need the Pass node as long as every node in your script is wired together in some way, I only used it because I needed to make sure that all of the nodes were connected to the network.

 

Note: I currently have this update the record attached to the Marionette Object by using the PIO Handle (Parent PIO) node. If you want to assign it to an item inside of your Marionette Object (or if you are just using it in a standalone script), you can just wire the object you want to assign the record to there.

 

SimplePopupStringExample_withRecords_MFarrell.vwx

Link to comment

Hi Marissa, thank you again, very helpful and interesting...

 

do I understand it correctly your new choices node gives to results: i is the integer representing the number of the option in the list and s results the string?

So I can still use 'i' for a comparison in a valve node and 's' to write it in my record field...

 

Link to comment

Ah I see... thanks.

And hopefully my last question for some time... if I'd like to write several record fields at once I will need a 'set record field' node for each entry.

But do I also need an 'attach existing record' node and 'parent PIO' for each entry or is it possible to connect several 'set record field' nodes to the same one 'attach existing record' node?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...