- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2020 10:27 AM
This is a followup to https://community.servicenow.com/community?id=community_question&sys_id=76c2f09edb28d410414eeeb5ca96...
I have added a Macro with Label to a catalog item and using a widget for the URL Link. The widget creates the checkbox. How to I script and capture the widget checkbox as "true" in the workflow If activity?
Currently capturing the Macro with Label variable in the IF activity not working.
answer = ifScript();
function ifScript() {
if (current.variables.var_name == 'true') {
return 'yes';
}
return 'no';
}
Example of widget from other post:
<div>
<input type="checkbox">Your Text <a href="www.google.com">To Do & not To Do</a><br>
</div>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2020 12:59 PM
Thanks all, I will go back to my original plan and use the checkbox variable and add a separate variable to display the URL LINK.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2020 10:36 AM
Why didnt you create a checkbox as a variable?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2020 10:42 AM
I tried that first, but I need a URL link on the variable so that the customer can check the box and/or go the the URL and review information.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2020 11:05 AM
But this wont work in portal, if in future you want to use portal.
I would suggest adding checkbox variable. And add the hyperlinks to the description of the catalog item, so that users can click on it.
If that doesn't work for you, create the checkbox variable and below that add the Macro, which will say Click to view the LINK
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2020 10:54 AM
Hello
Instead of doing so many things, like creating Micro and All.
Why you did not create a simple checkbox and make its Lable as Link.
Please the below "Priority" field on the incident form, it will appear in blue color, if you click on it, it will redirect you to a Knowledge Article.
Please refer below image
If you Right Click on "Priority">> Configure Label, you will get a URL field where you can give the URL.
Try it once, you will get help from it.
As creating Micro is difficult and complex to manage.
Please Mark it helpful/correct if my answer helps in any way to resolve your query.
Reach out to me if any more help required.
Regards
Yash.K.Agrawal