You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bit of a strange one this and I was wracking my brains for about a day before I got an idea of what was going on.
We have a DataObject with a number of fields that use Display Logic. Two of these are ListboxField controls that use displayIf to control their visibility based on the value of an OptionsetField (not the same option set, different for each list box). The code to create these fields is virtually identical but for one of them the list box would never display on page load, although it would show based on the click, i.e. if I changed the option and then changed it back.
The best I could get from debugging is that the onmatch event for $('div.display-logic-master :checkbox, div.display-logic-master :radio') would not fire for this particular control, although it would for the other.
In desperation I started trying different things and eventually I renamed the DB field that was being referenced by displayIf and suddenly it started working. For some reason the code did not like the original name of the field which was "CanViewType". As far as I know this isn't a reserved word but it seemed to be affecting how Display Logic worked.
We've written a migration to change the field name so we've worked around it but thought you should be aware of this since it took me a looooong time to track down.
The text was updated successfully, but these errors were encountered:
Using
dev-master
on SS 4.4.Bit of a strange one this and I was wracking my brains for about a day before I got an idea of what was going on.
We have a
DataObject
with a number of fields that use Display Logic. Two of these areListboxField
controls that usedisplayIf
to control their visibility based on the value of anOptionsetField
(not the same option set, different for each list box). The code to create these fields is virtually identical but for one of them the list box would never display on page load, although it would show based on the click, i.e. if I changed the option and then changed it back.The best I could get from debugging is that the
onmatch
event for$('div.display-logic-master :checkbox, div.display-logic-master :radio')
would not fire for this particular control, although it would for the other.In desperation I started trying different things and eventually I renamed the DB field that was being referenced by
displayIf
and suddenly it started working. For some reason the code did not like the original name of the field which was "CanViewType". As far as I know this isn't a reserved word but it seemed to be affecting how Display Logic worked.We've written a migration to change the field name so we've worked around it but thought you should be aware of this since it took me a looooong time to track down.
The text was updated successfully, but these errors were encountered: