How to provide the Dynamic Link in Service Portal form

venkateshdhanap
Tera Contributor

Hi All,

I need to provide the dynamic link to the form like "Take assesment". In catalog item form.

find_real_file.png

My aim is to assign one quiz to the user who are selected in the same form through the Client script. Then I have to display the link to that quiz(This quiz link will have sys id of the quiz assigned to that particular user).

I can able to get the Exact link only after getting the user name from the form. If it is the static link I can directly display it for all users.

Kindly suggest any method to achieve this.

Thanks

Venkatesh Dhanapal

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage

Hello Venkatesh,

 

you can achieve this by using widget. create a widget with HTML to have <a></a> tag and have the href value as some variable.

in the same widget, have server side script to compute the URL and show assign the url value to the variable used above.

 

you can create a macro type variable and then give this widget reference in default value tab. It should work as per your requirement.

please refer below URLs for more details on widget creation.

https://docs.servicenow.com/bundle/london-servicenow-platform/page/build/service-portal/concept/adv-widget-tutorial.html

 

Let me know for any query.

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

3 REPLIES 3

Ahmmed Ali
Mega Sage

Hello Venkatesh,

 

you can achieve this by using widget. create a widget with HTML to have <a></a> tag and have the href value as some variable.

in the same widget, have server side script to compute the URL and show assign the url value to the variable used above.

 

you can create a macro type variable and then give this widget reference in default value tab. It should work as per your requirement.

please refer below URLs for more details on widget creation.

https://docs.servicenow.com/bundle/london-servicenow-platform/page/build/service-portal/concept/adv-widget-tutorial.html

 

Let me know for any query.

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

SatheeshKumar
Kilo Sage

Hi,

 

Is your problem solevd??

prathamesh5
Mega Contributor

hlo