Custom variable data type in service catalog

Aditya_hublikar
Mega Sage

Earlier i had one requirement , to show url in service catalog item , so tried variable type url but it was not clickable.

Aditya_hublikar_0-1778560448400.png

 

Aditya_hublikar_1-1778560524305.png

 

So I explore other data type then i get to know about custom variable type .

 

"Custom" is  specific Service Catalog variable types used to embed complex UI elements like widgets or macros directly into a catalog item form. 

 

So I tried that on my pdi for testing  :

1)created  macro for native ui 

Aditya_hublikar_3-1778560750014.png

 

2)created widget for portal 

Aditya_hublikar_4-1778560835230.png

 

 

3)custom variable 

Aditya_hublikar_5-1778561038338.png

 

Aditya_hublikar_6-1778561061350.png

 

output :

Aditya_hublikar_7-1778561147432.png

 

Now my url is clickable .

 

Just sharing this content here for other community members to know about Custom variable type .

 

 

 

 

 

 

8 REPLIES 8

svirkar420
Tera Guru

Hi @Aditya_hublikar , There is no need for creating a UI macro.

Just create a variable with rich text and then embed the link into it, that's all you will be able to click on that link as well. Let me know for any further need in configuring the variable.

 

If this solution helps you please give it a 👍and mark it as accepted solution.

Regards,

Saurabh V.

Hello @svirkar420 ,

 

Thank you for replying I just have one more query , If link want dynamic means , for example for variable a there is link a , for variable b link b should visible . Is it possible to create only one rich text label and dynamically change inside href link .

Hi @Aditya_hublikar , You can control this behaviour by showing and hiding the rich text label variable in catalog form using catalog UI policy and for more flexibility use catalog client script. By using this you can hide and show particular variable to your form. 
if you share the exact requirement I can tell exatly what you will need to use and how you can configure the same.

 

If this solution helps you please give it a👍 and mark it as accepted solution.

Regards,

Saurabh V.

Hello @svirkar420 ,

 

Yes but can we perform this on single variable ? without creating multiple variable .