Catalog Item widget check box with hyperlink

Dead Blade
Kilo Guru

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>

 

 

1 ACCEPTED SOLUTION

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.

View solution in original post

8 REPLIES 8

Yash Agrawal1
Tera Guru

Hello @Dead Blade 

If your issue is you want a checkbox variable's label as a link, then why you are going through the complex way, simply use the below way

find_real_file.png

As you can see, I created a checkbox variable, which's the label is "LINK", so by clicking on that you can redirect to the specified link.

UI MAcro is complex, difficult to manage and understand, and bulky to implement in the system.

If you are interested in the solution, then implement it as below

find_real_file.png

And then go to sys_properties.list>>find a property "glide.ui.escape_text" ,it is tru by defualt so mark it as false.

You requirement will get fulfill

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

 

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.

Hello dead blade.

As you saw in the provided suggestion ,I created a Checkbox type of field. which will work as link.

The solution is working perfectly.

So,If you tried that solution,and found correct.

then will you please mark the response as CORRECT.

It will help others,who are searching for the same kind of assistances and also help to increase my score.

I hope you got my point.

Regards,

Yash Agrawal

Hi Yash,

This is not supported on portal, please let me know if any more modifications required.

Thanks,

Shubham