Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Solved! Go to Solution.
It is very simple. The url can not contain a space character
you have to replace the space character with a encoding character %20
check following link https://www.w3schools.com/tags/ref_urlencode.ASP
PetrH
I think you have assign a data utility to that variable for it to render as a hyperlink.
I use a following code to build the a download URL for the URL link variable in the workflow that is set this object in the variable URL type that I show in the task page.
//URL urlSet = ContentHelper.service.getDownloadURL(orderDocument, apData);
String serverURL = AttachmentsDataUtilityHelper.getBaseURL();
String urlString = serverURL + "/servlet/AttachmentsDownloadDirectionServlet?oid=OR:";
urlString = urlString + contents.getPersistInfo().getObjectIdentifier().getStringValue();
urlString = urlString + "&cioids=";
urlString = urlString + apData.getPersistInfo().getObjectIdentifier().getStringValue();
urlString = urlString + "&role=";
urlString = urlString + apData.getRole();
URL urlSet = null;
try
{
urlSet = new URL(urlString);
} catch (MalformedURLException e)
{
e.printStackTrace();
}
the urlSet is the final object that is saved in a wokrflow variable and then I show this variable in the task activity page
hope this can help
PetrH
@HelesicPetr, the problem that I am running into is that I have a space and it stops the link at the space and then shows the rest but it isn't part of the link.
String PowerBI_Lnk = PowerBI_WU_Begin + " " + wtpartList;
It is very simple. The url can not contain a space character
you have to replace the space character with a encoding character %20
check following link https://www.w3schools.com/tags/ref_urlencode.ASP
PetrH
Hi @HelesicPetr
The strange thing is that if I don't use a custom JSP page and show the variable, it worked. It was just in the instructions section of either the OOTB or custom JSP page. That is why I found it strange.
Thanks again for the help!
