Jump to content

JS rule not working after conditional visibility is applied


Recommended Posts

Hello -

 

I'm trying to run a rule that pulls text resource from whatever entry is selected from a drop down list. Without any conditional visibility rules applied in the "UI Rules" tab, the rule works perfectly. However, Once conditional visibility is applied, the rule no longer pulls a text resource to any field that was previously hidden.

 

If I use a switch rule that references the exact name of the resource, there are no issues with conditional visibility.

 

The rule that does not work after applying conditional visibility rules under the "UI Rules" tab:

 

if (Field("address1A") != "") {

return Resource(Field("address1A"));

} else if (Field("address1B") != "") {

return Resource(Field("address1B"));

} else if (Field("address1C") != "") {

return Resource(Field("address1C"));

} else if (Field("address1D") != "") {

return Resource(Field("address1D"));

} else {return "";}

 

 

Thanks for taking the time to look this over!

Matt

Link to comment
Share on other sites

×
×
  • Create New...