Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
hello,
i want to show dropdown after selecting radio button using validation service to fill form. if i select "staff" it shows "program" dropdown and if i select "member" then it shows "Band" dropdown, Please refer attachments below,
Solved! Go to Solution.
I am not sure of the use case where you need to do it this way but this is how you can do it.
You can define a Validator function(bottom right Function -> +) which has a Boolean parameter & in the expression just enter the name of the same variable. Check Auto Evaluate checkbox. Save it.
Bind the State property of Radio button to this boolean parameter & the Output variable of the validator to the Visible property of Drop down.
When radio button is selected, true value will be set to the input variable and the same is being returned from the expression. So Output variable of validator is also true which in turn sets the Visible property of dropdown to true.
You can bind the State property of the radio button with the Visible property of the corresponding dropdown, to achieve this. So, when Staff radio button is in selected state, Visible property of Program dropdown would be true.
Sorry, I did not understand your requirement. The 3rd screenshot just seems to have a button & title in addition to the first one.
What are you trying to validate here? Could you please elaborate on " using validation service
for this to fill the form"?
Are you trying to achieve this(making a different drop down visible as per radio button selection) using validation function rather using state of radio button to make the dropdown visible?
I am not sure of the use case where you need to do it this way but this is how you can do it.
You can define a Validator function(bottom right Function -> +) which has a Boolean parameter & in the expression just enter the name of the same variable. Check Auto Evaluate checkbox. Save it.
Bind the State property of Radio button to this boolean parameter & the Output variable of the validator to the Visible property of Drop down.
When radio button is selected, true value will be set to the input variable and the same is being returned from the expression. So Output variable of validator is also true which in turn sets the Visible property of dropdown to true.
Hi @Ru.
If you feel that one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.
Thank you for your participation in our community!
Regards.
--Sharon