how to hide reference fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 07:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 07:33 AM
You can use a "UI Policy" to hide fields, based on conditions if you like.
See:
Notice the value 'All' for "Run scripts in UI Type". change the table and field names in the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 10:12 AM
hi BERT, i try it but it didn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 02:58 PM - edited 04-16-2024 03:31 PM
In the above, your "g_form.setVisible()" is passing 3 values, only two are supported, see:
GlideFormAPI_GlideFormSetVisible
why are sys_id values in the paramater list?
Also, the logic differs if the record is 'new', when the conditions are met. I'm not sure you want different behavior for 'new' vs. 'existing' records. If not, just use 'setVisible' lines for the fields you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 07:48 AM
To achieve this you need to use UI Policy if you are working on record form or Catalog UI Policy if you need it on catalog form.
As per your condition you need to add condition in "when to apply" section of UI policy. In your case condition would be application service is AppMon-Global-Prod. >> Save UI Policy
Then you need to add UI Policy action as "priority" field as visible false.
For Example, (In Your case field would be Priority)
Additionally, FYI Priority field is dependent on impact and urgency as per data look ups configured so you cant set it directly.
This will definitely helps you to resolved your issue. Let me know in case you need to understand the flow or you can DM on LinkedIn.
If this solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.
Best Regards,
Krushna Birla