- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 01:59 AM
Hi All,
my requirement is to hide UI action button based true/ false field . Please help me on this .
I have written UI Action condition but its not working .
Thanks,
Suresh.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 02:15 AM
Do you want to show if all of condition meets then try below code,
current.state==-5 && !current.isNewRecord() && current.u_wood_mill!=true
OR
current.state==-5 && !current.isNewRecord() && current.u_wood_mill!='true'
Let me know if you have any further questions.
Please mark this as Correct or Helpful based on the impact.
Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 02:07 AM
Hello suresh,
I use an UI policy for this, u need to uncheck "Isolate script" and set your conditions. To script put this:
execute if true:
function onCondition(){
$$('#ui_action_name')[0].show();
}
execute if false:
function onCondition() {
$$('#sui_action_name')[0].hide();
}
Works in Rome and San Diego.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 02:15 AM
Do you want to show if all of condition meets then try below code,
current.state==-5 && !current.isNewRecord() && current.u_wood_mill!=true
OR
current.state==-5 && !current.isNewRecord() && current.u_wood_mill!='true'
Let me know if you have any further questions.
Please mark this as Correct or Helpful based on the impact.
Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP