a!safelink to User record type on Site

I am building an interface that will be used on a non-user record type on a Site. Currently, I have a link to a user record that opens on the same screen, but it would be a better experience if the user record link opened in a new tab on the Site. For non-user record types, I could use a!safelink(). Any ideas on how to do this given that I'm trying to link to a user record type?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    I've been wondering this too. I assume it's not possible using current functionality, as I don't necessarily see a way to grab the record URL stub (at least, without poking around in the back-end functionality of a!userRecordLink and manually reconstructing the user record URL).

    It seems to me that it would be a lot easier and more flexible if Appian would build in new parameters (presumably to a!recordLink and a!userRecordLink) allowing us to manually set them for "open in new tab", since this is such a common use case.
  • +1
    Certified Lead Developer
    in reply to Mike Schmitt
    For those interested, this will give you the URL as Mike suggested:

    =load(
    local!stub:index(index(a!userRecordLink(user:<YOUR_USER_HERE>),"@attributes"),"@anyattribute",null)._recordRef,
    local!url:urlforrecord(recordType:<CONSTANT_OF_TYPE_USER_RECORD>,recordIds:1),
    local!suburl:extract(local!url,"item/","/view"),
    a!textField(value:substitute(local!url,local!suburl,local!stub))
    )
Reply Children