2022.2

Table Of Contents
Finally,youneedanotherWorkflow processtoprovidethepURLtotheuser,inanemail,forexample,
orinaQRcode.ThisprocessmustaddthenecessarydatatothepURL.Thatdatashouldbeavailable
throughtheDataModelusedinthetemplate.
InWorkflow,youmaymakeuseofthesystemvariable%Utocreateuniquestrings.
InsertingapURL
AssumingthatthenecessarydataandWorkflowprocessesareavailable,here'showyouinsertaper-
sonalizedURLinatemplate.
1. Openthetemplateandfindorenterthetextthatyouwanttoturnintoalink.
2. Selectthetext,right-clickitandselectWrap in Span....
3. GivethespananID,forexample:get_pdf_link.ClickOK.
ThetextDownload PDF,wrappeditinaspanwiththeIDget_pdf_link,wouldlooklikethis
ontheSourcetab:<span id="get_pdf_link">Download Invoice</span>.
4. Withthespanselected,clickon'ID'ontheAttributespane(clickonthefieldname,notthefield
itself).ThiswillinsertascriptthathasthisIDasselector,andopenitinthescripteditor.
Sinceit'sdynamic,insertingapersonalizedURLalwaysimplieswritingascript,howeversmall
andsimple.Forabasicexplanationofscripts,see"Writingyourownscripts"onpage808.
5. Typethecodethatwrapsthespanina<a>element(ahyperlink).Inthelink,thehostshouldbe
followedbytheactionwithwhichthecorrespondingWorkflowprocessistriggeredandthedata
withwhichWorkflowwillbeabletocreateapersonalizedresponse.
Sample script
Let'sassume:
l
AWorkflowprocessistriggeredbytheHTTPaction:MakePDF.
l
ThetemplatethatoutputsthepURListobemergedwitharecordthatcontainsadatafield
invoice_UUID.Thisdatafieldholdstheinformationthatthe'MakePDF'Workflowprocess
needsinordertocreatepersonalizedoutput.
l
Thetemplatecontainsaspanwiththelinktext"DownloadInvoice":<span id="get_pdf_
link">Download Invoice</span>.
Thefollowingscript,withtheselector#get_pdf_link,willcreateavalidlinkaroundthespan:
results.before('<a href="http://www.example.com/MakePDF?uuid=' + record.field-
s.invoice_UUID + '">');
results.after('</a>');
Page 762