setDisplay not working on variable editor, but setVisible does
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 01:14 PM
I have a scenario where I am making a connection between two custom scoped applications. One is a “legacy” application that has existed at my company for over 6 years, the other is one that I am newly building. The new app contains a Parent record (created by a record producer) whose creation then triggers a Flow to create three child tickets associated to the Parent. These child tickets are assigned to three different teams who have access to the Parent table but not the child tables for the other teams. Two of those child tickets stay within the new app scope. One of those child tickets is created in the legacy application.
For the convenience of our teams using these apps, I am showing the record producer details on variable editors on the child tickets. (I did this by creating a custom UI macro.) All of this that I have mentioned is working well. The variables from the Parent display on each of the child forms.
But, as an additional requirement, I have now been asked to hide some of the variables on the variable editors depending on which child ticket form you are on. For example, Team A does not need to see variable Y for their work, so when looking at Team A’s child ticket, I used a UI Policy and setDisplay(‘variable_name’, false) to hide variable Y neatly. For the new tables that have the child tickets, this works fine. But for the child ticket in the legacy application, setDisplay simply will not work no matter what I try. I changed setDisplay to setVisible and that does work, but leaves gaps in the variable editor and it doesn’t look good.
I don’t think it’s a scope issue because the cross-scope permissions have been sorted out and thoroughly tested, and the variables show on the form just fine. They just can’t be hidden the way I was expecting. Several of these fields are mandatory due to catalog UI policies but they are always filled in. And the ones that are never mandatory still will not hide when I use setDisplay. There are no variables that are always mandatory that I am trying to hide. On the other child tickets, I have no problems using setDisplay for variables that are mandatory. It works as expected. This is on the UI side and will not be used on the portal.
Has anyone had this issue on a variable editor? Does anyone have any ideas to try?