how to hide reference fields

PRADEEPREDDY GU
Tera Expert

Hi foks,

 

i need to remove/hide the ticket priority P1(Critical) from the application service AppMon-Global-Prod .plz see attached screenshot....

 

can anyone provide solution

5 REPLIES 5

Bert_c1
Kilo Patron

You can use a "UI Policy" to hide fields, based on conditions if you like.

 

See:

 

Screenshot 2024-04-15 132512.png

Notice the value 'All' for "Run scripts in UI Type". change the table and field names in the script.

PRADEEPREDDYGU_0-1713287463942.pngPRADEEPREDDYGU_1-1713287504755.png

hi BERT, i try it but it didn't work

Hi @PRADEEPREDDY GU 

 

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.

Birla_Krushna
Tera Contributor

Hi @PRADEEPREDDY GU 

 

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)

Birla_Krushna_0-1713278755393.png

 

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