My SharePoint Buddy called me today and asked if I could look at something she was trying to do. She had a list form (customized with InfoPath) where she wanted to display a clickable URL that was customized based on a field value in the list. Regardless of how we tried to use calculated values and such, we couldn’t get a clickable URL when she opened the form for display. I did a little research and playing around, and I came up with a nice hack (at least I thought so).
So here’s the basic function we were after (ignore everything but the last two fields… I “repurposed” a test list for this). The URL would be clickable, and was customized with the value in the Search Word field:
In the Set Workflow Variable action, I just took the first part of the URL, added the field that had the custom value, and then added the end of the URL (in this case, we were building a URL for a search result page):
Once the workflow was run, the Calculated URL field was added properly, and the customized form would display it as a clickable link. Exactly what we were after.
She then took it one step further… instead of displaying the URL value like I did on my test page, she just created a link on the page called Description, and set the value of that link to be the contents of the Calculated URL field. So now, the form looks clean, the visible clickable link is the same on all the forms, and the underlying URL in the link is the customized value.
I love when these things work. 🙂