Export Button in Record Grid (Long URL links in Excel file)

Certified Senior Developer

I am using the export button in a record grid field. However, when the Excel file is downloaded, some of the fields have long URL links in parentheses next to them. I am not sure how to get rid of the URL links. I think this is because one of the links is a a!recordLink() component and another link is created through a personalized expression rule. Wanted to see if anyone else had insight about this on getting the link to show as normal rather than a super long URL. I have provided a screenshot of what the Excel file looks like below. 

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Senior Developer
    in reply to Harshit Bumb (Appyzie)

    There are two columns in the grid that are showing the long URL links:

    This is the first column ("Added To Queue") which is referencing a record link 

    a!gridColumn(
                            label: "Added To Queue",
                            sortField: 'recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{availableSamples}availableSamples',                        
                            value: a!richTextDisplayField(
                              value: {
                                a!richTextItem(
                                  text: if(rule!APN_isBlank(fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{availableSamples}availableSamples']), "0", text(fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{availableSamples}availableSamples'], "###,###")),
                                )," ",
                                a!richTextIcon(
                                  icon: cons!IVLIMS_STYLE_ICON_LINK_OUT,
                                  caption: "Open Manage Samples Suite",                              
                                  color:"ACCENT",
                                  linkStyle:"STANDALONE",
                                  link: a!recordLink(
                                    label:"Samples Suite",
                                    recordType:'recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan',
                                    identifier:fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{workflowTemplateID}workflowTemplateID'],
                                    dashboard:"_M4v9Sg",
                                    openLinkIn: "NEW_TAB"
                                  )
                                )
                              }
                            )
                          ), 

    This is the second column ("Updated By") which is using a personalized rule to link to a user's profile 

    a!gridColumn(
                            label: rule!IVLIMS_displayLabel(field: "updatedBy"),
                            sortField: 'recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{updatedBy}updatedBy',
                            value: rule!IVLIMS_displayUserOrGroupFormatted(
                              personOrGroup: if(fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{updatedBy}updatedBy'] = "Administrator",
                              cons!IVLIMS_LABEL_SYSTEM,fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{updatedBy}updatedBy'])
                            )
                          )

  • 0
    Certified Lead Developer
    in reply to tracyli

    Aight, got your issue now.

    You are trying to add a link to a richTextIcon and due to accessibility issues the icon is not getting displayed in the resulting Excel. Alternatively, you can use altText parameter in richtextIcon() to display an alternate text when icon is not accessible.

  • 0
    Certified Senior Developer
    in reply to Sanchit Gupta (Xebia)

    I've tried using the altText parameter before but it does not get rid of the URL link. Just shows the altText next to the link now.

  • 0
    Certified Lead Developer
    in reply to tracyli

    So, I've tested it myself and it works perfectly fine. Can you please share the latest code?

    a!gridColumn(
          label: "Request",
          sortField: 'recordType!{4159bc7e-822e-44d7-bdea-42ce7ab5c096}AA Maintenance.fields.{eee2f931-999a-4540-bed2-e907dc892c8a}maintenanceId',
          value: a!richTextDisplayField(
            value: a!richTextIcon(
              icon: "circle-o",
              altText: "Test",
              link: a!recordLink(
                label: text(
                  fv!row['recordType!{4159bc7e-822e-44d7-bdea-42ce7ab5c096}AA Maintenance.fields.{eee2f931-999a-4540-bed2-e907dc892c8a}maintenanceId'],
                  "MR0000"
                ),
                recordType: 'recordType!{4159bc7e-822e-44d7-bdea-42ce7ab5c096}AA Maintenance',
                identifier: fv!identifier
              ),
              linkStyle: "STANDALONE"
            )
          ),
          align: "START",
          width: "AUTO"
        )

  • 0
    Certified Senior Developer
    in reply to Sanchit Gupta (Xebia)

    So I tried adding the label in as text within a!recordLink() as you have in the example code, but it still shows the URL in the exported Excel sheet. I'm not sure if this is because I have two rich text components within the grid column. 

    a!gridColumn(
                            label: "Added To Queue",
                            sortField: 'recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{availableSamples}availableSamples',                        
                            value: a!richTextDisplayField(
                              value: {
                                a!richTextItem(
                                  text: if(rule!APN_isBlank(fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{availableSamples}availableSamples']), "0", text(fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{availableSamples}availableSamples'], "###,###")),
                                )," ",
                                a!richTextIcon(
                                  icon: cons!IVLIMS_STYLE_ICON_LINK_OUT,
                                  caption: "Open Manage Samples Suite",                              
                                  color:"ACCENT",
                                  altText: "Link Out Icon",
                                  linkStyle:"STANDALONE",
                                  link: a!recordLink(
                                    label:text(fv!row['recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan.fields.{availableSamples}availableSamples'],"###,###"),
                                    recordType:'recordType!{c184666d-5062-434d-b978-cb5d0426e17a}IVLIMS_REC_Work_Plan',
                                    identifier:fv!identifier,
                                    dashboard:"_M4v9Sg",
                                    openLinkIn: "NEW_TAB"
                                  )
                                )
                              }
                            )
                          ),