Gurpreet, fully correct answer to my question!!! thank You,


it is solved for me now.




I made notes about that for the future. Its sometimes   hard get in to codes when not working with them every day.




Below is an image of how it looks like when training is selected. I also created wizard UI policy to hide macro if training field is empty so the macro label doesn't disturb/confuse users




Thanks a lot for your time on this, very appreciate this




/Petr


1a.jpg


Thank you for this solution - I great solution to get your Links on the catalog form since there is no URL Catalog variable type available.


wiltonr
Giga Contributor

Do you know how I can pass a url to a ui macro so that it will display on my catalog item in this manner:



I am building a url on change of a variable on my catalog item but a client script making an ajax call to a table with some specific values.   So I return a url that is similar to this:



https://xxxxxxxx.wustl.edu/docid=1234&invid=65434&docdept=65434



I want this to then display on my catalog item more like this:



Click here to View Image



I am thinking I need to use a UI Macro variable.   i am able to pass the url to the ui macro but I can't figure out how to then get the code in the ui macro to be able to insert it into the <a href tag.



Any help would be appreciated.


Hi Rhonda,



Suppose u are having url in a variable called url then u just need to build HTML String as follow



var url = 'https://google.com' ;         //get it using ajax


var text   = '<a target="_blank" href="'+url+'">Here</a>' ;


//then use the same function (setDesc) to set above html in the macro



setDesc(text) ;


In this case, then what does the UI macro code look like?