Hide the URL link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 04:03 AM
Hello experts,
I have a URL type field on a form and I am setting up the URL dynamically from the workflow.
Is there a chance like, once the user clicks on the url link, then the link has to be disappeared.
Because once the user clicks the link, the action is already performed and why to show that link again and make it clickable again and again?
Can you please help me
Regards,
Lucky

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 04:11 AM
Hi,
You can use client script or UI policy to check the condition and manage the visibility of your field.
There is no way to identify if the URL has been clicked or not.
You have to manage visibility based on some other field values.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 04:18 AM - edited 07-24-2023 04:18 AM
Hello @Lucky1
There might be some simple solution to it to include some onclick event or something, but question is on the purpose of the link and what action does that perform. It is like password reset link, which once the password is reset, the link should be removed? if yes then I would look into solution where based on application to which link is pointing, trigger an event or some API to ServiceNow only when intended action is performed, then remove the link.
For example, Imaging you opened the form, clicked on the link and now the link is removed from the form. but for some reason, the intended action was incomplete (there can be several reasons, example incomplete data to perform the activity, network issue) then you have lost URL as well. How you will find the URL? submit related request again? it is not good user experience.
Let me know if I got the use case wrong.
Thank you,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 04:28 AM
Hi ALi,
Yes, I understood this.
Currently, as I mentioned, that link will provide the user a new Change request form.
So, I feel providing the new CR form from the link is sufficient for one time but not on everytime when they click it.
Can you kindly help me on this
Regards,
Lucky

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 04:41 AM
Hi @Lucky1
One simple solution would be to hide the field altogether and create an UI action on the form. Make the button visible only if the URL field has value. Now, in UI action script, you can create the URL field value and then redirect user to the URL using action.setRedirectURL(YOUR_URL) in UI action script, You just have to copy the URL in some variable in script, then clear the field value and update record.
There could be other ways, but that depends on how much value does this functionality brings with respect to the customization being done.
Thank you,
Ali
Thank you,
Ali