Hide Related Link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:13 AM
Hi Team,
I want to hide Related link, based on the change of field value on form.
Appreciate your inputs.
Thanks,
Rekha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:21 AM
Hi Rekha,
Related link is nothing but an UI Action of type Form link. Please find the UI Action and modify the 'Condition' field in order to hide the link in certain conditions.
For example, you do not want to show the link if the State field is Closed (i.e., value is 3). In that case put the condition of the UI action as current.state !=3. That means the UI Action will be visible when the State of the current form is not Closed.
I hope this helps.Please mark correct/helpful based on impact

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:23 AM
you can do it with conditions in the UI Action itself if you don't mind waiting for the page refresh after the value is changed, but if you need it to hide on the client side the moment the user changes the value, you would need to use JQuery (or something similar) to select the element and hide it. fortunately, it looks like SNOW makes the ID of the element the sys_id of the UI Action, so if you go get the sys_id of the UI action, you can write an onchange client script for that field that would run something like this:
$j('#'+ sysId).hide()
where sysId is the sys_id of the UI Action you want to hide. Not sure if SNOW has a more formal client side API to the UI Actions, but I don't think they do.
let me know if this makes sense.