Show fields based on multi-select lookup field
Hi
I am trying to show fields based on user input in a multi-select look up field. I'm pretty new at Zoho creator, but I've been searching through the forums, so I know I need to fetch the data for the lookup field first. I've tried the code below but with no success. I'm probably doing something basic wrong, so any help would be greatly appreciated!
if(input.Multiselect_lookupfield.size() > 0)
{
myVar = Lookup_Form[ID = input.Multiselect_lookupfield].Namefield;
if(input.myVar.contains("John Smith"))
{
show John_Smith_Paid;
}
if(input.myVar.contains("Jane Doe"))
{
show Jane_Doe_Paid;
}
}
Also, if there was a way to automate this process for each multi-select option that would be amazing! The fields to show are all named systematically. I.e. if "John Smith" is selected, I want to show the field called John_Smith_Paid, so maybe it is possible?
Thanks in advance!