I have a Record that displays a dashboard using database data.

I have a Record that displays a dashboard using database data. My normal text fields display fine, but I have a field in the DB that I want to display as an html type link. I am attempting to use the a!safeLink to do this, and it works to display a URL when the provided URL is valid. However, if the URL is blank or isn't a legitimate link then it fails and the entire Record doesn't display (versus a graceful alternative text/link). I have been unable to figure out a good way to test the provided url to verify it is ok and thereby use a text field versus safeLink. isnull() works in theory but doesn't catch invalid URLs.

current code works for say, www.adobe.com, but fails (Expression evaluation error in rule 'osrc_getdetailforrecorddashboard': http://dsafesrf123: ; is not a permitted URI under the configured security rules and cannot be cast to safeUri.) if I randomly give it a value.

a!safeLink(
label: rf!ProviderUrlTxt,
uri: "htt...

OriginalPostID-113082

  Discussion posts and replies are publicly visible

Parents
  • I'm less worried about sanitizing the URL as I am displaying whatever the user previously entered in a text field and showing it if possible as a URL type link that can be clicked on. Is there a way to test the value and just call a a!textField instead of a!safeLink? I tried to call SafeURI(rf!ProviderUrlTxt), but no surprise, the references in the documentation for SafeURI isn't for an actual function to return true/false.
Reply
  • I'm less worried about sanitizing the URL as I am displaying whatever the user previously entered in a text field and showing it if possible as a URL type link that can be clicked on. Is there a way to test the value and just call a a!textField instead of a!safeLink? I tried to call SafeURI(rf!ProviderUrlTxt), but no surprise, the references in the documentation for SafeURI isn't for an actual function to return true/false.
Children
No Data