Safe link

I am trying to use safelink outside record link getting the error as expected.

error :Interface Definition: Expression evaluation error at function a!gridField: A grid component [label=“null”] has an invalid value for “columns”. A grid column [label=“Module Names”] has encountered an error. Expression evaluation error at function a!safeLink [line 11]: Could not cast from RecordLink to Safe URI. Details: CastInvalidCould not cast from RecordLink to Safe URI. Details: CastInvalid

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi, Could you please tell why are you using safe link ? what is the requirement?

  • okay sure Appian Community with the recordlink the functionality is working fine(The parameter openlinkin cannot be use in my case bcoz the version(2.2)) but the modules has to be open in new tab so I am trying to use same code with safelink. I hope my question is clear. Please suggest me if any possible way for this?

  • 0
    Certified Lead Developer
    in reply to JS0001
    The parameter openlinkin cannot be use in my case bcoz the version(2.2)

    Hi,

    What you mean by cannot be use 2.2. Which Appian version you are using? this openlinkin option available from 21.1 version? 

  • 0
    Certified Lead Developer
    in reply to JS0001

    Hi,

    I didn't understand your use case fully, but this is what I am thinking. You can try this solution. It will work for your situation based on the description your provided. 

    a!gridColumn(
            label: cons!CR_APP_LAB_MODULE_OVERVIEW[2],
            value: a!localVariables(
              local!recordUrl: urlforrecord(
                recordType: cons!CR_RECORD_TYPE_CUSTOMER,
                recordIds: ri!crModuelCheckList_cdt.cif_int /*Not sure why you are using this insted of fv!identifier */
                /*fv!identifier*/
              ),
              local!dashboardViewStub: if(
                fv!row.workflowId_int = cons!CR_WORKFLOW_IDS[1],
                cons!CR_MODULES_DASHBOARD_URL_STUBE[1],
                if(
                  fv!row.workflowId_int = cons!CR_WORKFLOW_IDS[2],
                  cons!CR_MODULES_DASHBOARD_URL_STUBE[2],
                  cons!CR_MODULES_DASHBOARD_URL_STUBE[3]
                  /*Note: Add all your remaining if conditions here if any*/
                )
              ),
              local!recordUrlWithSpecificView: substitute(
                local!url,
                "summary",
                local!dashboardViewStub
              ),
              a!richTextDisplayField(
                value: {
                  a!richTextItem(
                    text: fv!row.workflowDesc_txt,
                    link: a!safeLink(
                      label: fv!row.workflowDesc_txt,
                      uri: local!recordUrlWithSpecificView
                    )
                  )
                }
              )
            )
          )

Reply
  • 0
    Certified Lead Developer
    in reply to JS0001

    Hi,

    I didn't understand your use case fully, but this is what I am thinking. You can try this solution. It will work for your situation based on the description your provided. 

    a!gridColumn(
            label: cons!CR_APP_LAB_MODULE_OVERVIEW[2],
            value: a!localVariables(
              local!recordUrl: urlforrecord(
                recordType: cons!CR_RECORD_TYPE_CUSTOMER,
                recordIds: ri!crModuelCheckList_cdt.cif_int /*Not sure why you are using this insted of fv!identifier */
                /*fv!identifier*/
              ),
              local!dashboardViewStub: if(
                fv!row.workflowId_int = cons!CR_WORKFLOW_IDS[1],
                cons!CR_MODULES_DASHBOARD_URL_STUBE[1],
                if(
                  fv!row.workflowId_int = cons!CR_WORKFLOW_IDS[2],
                  cons!CR_MODULES_DASHBOARD_URL_STUBE[2],
                  cons!CR_MODULES_DASHBOARD_URL_STUBE[3]
                  /*Note: Add all your remaining if conditions here if any*/
                )
              ),
              local!recordUrlWithSpecificView: substitute(
                local!url,
                "summary",
                local!dashboardViewStub
              ),
              a!richTextDisplayField(
                value: {
                  a!richTextItem(
                    text: fv!row.workflowDesc_txt,
                    link: a!safeLink(
                      label: fv!row.workflowDesc_txt,
                      uri: local!recordUrlWithSpecificView
                    )
                  )
                }
              )
            )
          )

Children