Jump to content
Man

A more simple setup for setting a string based on a dropdown menu

Recommended Posts

I have a dropdown to select between 3 strings and a "Result" string that pulls the value based on the dropdown.  I'm wondering if there's a more preferred approach because if I want to add/remove an option I have to change it in 3 or 4 places.

I figured out my initial question of why everything isn't evaluated as expected when you first create a node when I set up this example, but I left it broken in the attached files.  If I change the default value of "dropdown" to "option1" it will work as expected.

dropdown_test.hda

Screen Shot 2019-03-07 at 11.30.22 AM.png

Share this post


Link to post
Share on other sites

I'm at work right now so can't look at your file, so I don't know how you set it up. But the way I'd do it is create a menu, as tokens I'd give it one, two, three with respective labels option1, option2, option3 

and in the result parm use `chs("menu")` (or whatever the name of the menu parm)

 

hope this helps :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×