Hiding Record URL behind a text

I am retrieving a Record URL using urlforrecord() function but all it gives me the complete URL string. My requirement is to hide the long URL string returned, by a text suppose "Record Link", I don't want to show that complex URL string in the mail the user gets just the text on the click of which it redirects it to the URL. Is there any way in appian to achieve this.

Thanks

  Discussion posts and replies are publicly visible

Parents Reply Children
  • +1
    Certified Lead Developer
    in reply to varunkumarb0001

    To add onto what Peter already said in his reply above -- I recently broke down and just created a systemwide expression rule to help in the quest to create a Sites-centric link to a record, as follows:

    /* GLBL_createRecordURLForSite */
    
    a!localVariables(
      local!defaultURL: urlforrecord(ri!recordType, ri!recordId),
      local!addSiteContext: if(
        rule!GLBL_isBlank(ri!siteName),
        local!defaultURL,
        if(
          rule!GLBL_isBlank(ri!recordId),
          /* Didn't see an easy way to link a record list in sites context */
          local!defaultURL,
          substitute(
            local!defaultURL,
            "tempo/records/item",
            "sites/" & ri!siteName &
            if(
              rule!GLBL_isBlank(ri!sitePageContext),
              "",
              "/page/" & ri!sitePageContext
            ) &
            "/record"
          )
        )
      ),
      local!addDashboardContext: if(
        rule!GLBL_isBlank(ri!dashboardStub),
        local!addSiteContext,
        substitute(local!addSiteContext, "summary", ri!dashboardStub)
      ),
      
      local!addDashboardContext
    )

    This code provides the opportunity to use 2 optional parameters: "site page context" allows you to pass in a site page (tab) name, and when used, the opened link will appear as if the user is on that "tab" (otherwise none will be highlighted); and "dashboard stub" allows you to direct to a dashboard (view) on the opened Record, other than the default (summary) view.

  • thanks  for the detailed answer. That's a big help...