convert string property to clickable hyperlink
In our problem management proces we are used to many attachements, some with large sizes and multiple versions. So we decided to put all the attachements in a document management system instead. We added an additional string property with name "Attachment Link" to the problem class and this prop is filled with the URL to the attachements location in the DMS.
We show this new property on the problem records form in the portal. But this is displayed as a string and therefor not clickable. Does anybody know a different datatype than string that creates a clickable link or do we need custom JS code to make this work?
Best Answer
-
Justin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭Oh. Try this instead:
ac.parent().append(pageForm.viewModel.AttachmentLink);
5
Answers
Matt_Medley, I tried it with <a href="http://www.google.com">Google</a> but the problem form will litteraly show the HTML code without translating it to a clickable link.. Would have been nice if this worked.
That makes sense, if you can provide a bit of sample code it would help me alot, thanks.
I tried this example and it sets the href to http://Portal/Problem/Edit/PR380693/<a href="http://www.google.com">Google</a>. In other words it appends the link to the base URL of the workitem. Do you know a way of replacing the href instead of append?
"<a href="http://www.google.com">Google</a> "
ac.parent().append(pageForm.viewModel.AttachmentLink);