Skip to main content
May 2, 2023
Question

I want to use a!safeLink() function. The uri keyword of that function uses SafeURI type. How do I cast a text string to a safeuri type?

  • May 2, 2023
  • 5 replies
  • 0 views

Hi,

a!safeLink(
label: "RPA",
uri: cast(
'type!{www.appian.com/.../2009}SafeURI',
"">XXXXX.appiancloud.com/.../nodes.xhtml",
),

Regards

    5 replies

    May 2, 2023

    Use below code and keep in mind that only  http, https, ftp, tel, and mailto schemes are compatible for SafeURI.

    cast(
      type!SafeUri,
      ">XXXXX.appiancloud.com/.../nodes.xhtml"
    )

    pauls0008Author
    May 2, 2023

    Thank you Sanchit - that sorted it out

    stefanhelzle0001
    Brainy
    May 2, 2023

    There is no need to type cast this. But it has to be a valid URL.