Next and Back Button for Records in a Read-Only Grid

So I have a read-only grid displayed on a site through an interface. The summary is also displayed through an interface, and the summary of a record is pictured below.

What I want to do is add a button, going to the next or previous record so that the user doesn't have to click the home button in the top-left.

I found this thread but wasn't sure how to apply it to my situation (not completely sure how to apply a!query):

community.appian.com/.../access-to-previous-and-next-records

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Did you read the answers I provided in the therad you linked?  What exactly are you not able to figure out?  FWIW the answers I'd give for this question now are no different from what I answered there, except for adjusting as needed for data sourced via Synced Records instead of Query Entity.

  • Yes I did, I don't understand where to put the a!queryEntity in relation to the button(s), and also how to create a datastore for the entity. I am using a record type but I'm not sure where to get the datastore from

    a!queryEntity(
      entity: cons!my_entity,
      query: a!query(
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: 1,
          sort: a!sortInfo(
            field: "primaryKey", 
            ascending: if(ri!fetchingPrevious, false(), true())
          )
        ),
        filter: a!queryFilter(
          field: "primaryKey",
          operator: if(ri!fetchingPrevious, "<", ">"),
          value: ri!currentPrimaryKey
        )
      )
    ).data.primaryKey

  • Thanks I'll try this! Currently I was using an expression rule. Got the "back" link to work but the "next" one just goes to the last record and not the record that's greater by +1 or +2

  • 0
    Certified Lead Developer
    in reply to davinar9817
    but the "next" one just goes to the last record

    Make sure you reverse both the filter operator as well as the sort directionality between the two queries.  Also make sure you preview the loaded local variable value in the Local Variables preview panel in the bottom-right of the interface editor - that makes troubleshooting and tweaking code much easier.

  • So everything was going well until I tried to merge the cards and my summary interface

    I'm just getting this CastInvalid error

                       a!sideBySideItem(
                          item: a!dateField(
                            label: "Start Date:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                            saveInto:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                            readOnly: true,
                            validations: {},
                            align: "LEFT"
                          ),
                          width: "MINIMIZE"
                        ),
                        a!sideBySideItem(
                          item: a!dateField(
                            label: "End Date:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                            saveInto:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                            readOnly: true,
                            validations: {},
                            align: "LEFT"
                          ),
                          width: "MINIMIZE"
                        )
                      },
                      alignVertical: "TOP",
                      spacing: "SPARSE",
                      marginAbove: "NONE"
                    ),

    Here's the full code if needed;

    {
    a!localVariables(
    
      /* the following 2 local variables would be loaded by queries given the current record ID */
      local!previousNavId: 1234567896,
      local!nextNavId: 1234567894,
    
      a!sectionLayout(
        contents: {
          a!columnsLayout(
            alignVertical: "TOP",
            columns: {
    
              /* left bar */
              a!columnLayout(
                width: "EXTRA_NARROW",
                contents: {
                  a!cardLayout(
                    height: "MEDIUM",
                    showShadow: true(),
                    tooltip: "Navigate to Previous Record",
                    link: a!recordLink(
                      recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
    identifier: local!previousNavId,
    openLinkIn: "SAME_TAB",
    showWhen: a!isNotNullOrEmpty(local!previousNavId)
    ),
    contents: {
    a!richTextDisplayField(
    value: a!richTextItem(
    size: "MEDIUM",
    text: {
    char(10), char(10), char(10),
    a!richTextIcon(
    icon: "arrow-left"
    )
    }
    )
    )
    }
    )
    }
    ),
    a!sectionLayout(
      label: "Additional Contractor Information",
      labelIcon: "info-circle",
      labelSize: "EXTRA_SMALL",
      labelHeadingTag: "H2",
      labelColor: "STANDARD",
      contents: {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!sideBySideLayout(
                  items: {
                    a!sideBySideItem(
                      item: a!textField(
                        label: "Name:",
                        labelPosition: "ABOVE",
                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{6576c50e-e121-46f9-ac66-80f275bdd60b}firstName' & " " & 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{9ad498eb-f112-4373-9f83-98d98fe98f1d}lastName',
                        readOnly: true,
                        align: "LEFT",
                        inputPurpose: "NAME"
                      ),
                      width: "AUTO"
                    ),
                    a!sideBySideItem(
                      item: a!textField(
                        label: "Phone Number:",
                        labelPosition: "ABOVE",
                        value:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{f4c57b1e-a70b-4b5c-abfd-91fbfa77c38f}conPhoneNumber',
                        readOnly: true,
                        inputPurpose: "PHONE_NUMBER"
                      ),
                      width: "AUTO"
                    ),
                    a!sideBySideItem(
                      item: a!textField(
                        label: "Email Address:",
                        labelPosition: "ABOVE",
                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2952c2ae-aeb6-47f0-9655-0628f009e981}contractorEmail',
                        readOnly: true,
                        align: "LEFT",
                        inputPurpose: "EMAIL"
                      ),
                      width: "AUTO"
                    ),
                    a!sideBySideItem(
                      item: a!textField(
                        label: "Contractor Department:",
                        labelPosition: "ABOVE",
                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{4b272b70-791f-4c19-a831-736b78fbd6b0}department',
                        readOnly: true
                      ),
                      width: "AUTO"
                    )
                  },
                  alignVertical: "TOP",
                  spacing: "SPARSE",
                  marginAbove: "LESS"
                ),
                a!sectionLayout(
                  label: "",
                  contents: {
                    a!sideBySideLayout(
                      items: {
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Axiom Manager Name:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{acd634c0-572b-45e4-9327-9a76ffa8ed82}mngrName',
                            readOnly: true
                          ),
                          width: "AUTO"
                        ),
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Axiom Manager Email:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{3e72a18f-c6b9-4223-a4e9-37631f23a060}mngrEmail',
                            readOnly: true
                          ),
                          width: "AUTO"
                        ),
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Company Name:",
                            labelPosition: "ABOVE",
                            value:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2476f354-8a05-4418-a463-61d9127ee99d}conCompanyName',
                            readOnly: true,
                            align: "LEFT"
                          ),
                          width: "AUTO"
                        ),
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Department Access:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{67465a62-d8e1-45b8-8c26-42d9daae509b}deptAcc1',
                            readOnly: true
                          ),
                          width: "AUTO"
                        )
                      },
                      alignVertical: "TOP",
                      spacing: "SPARSE",
                      marginAbove: "NONE"
                    )
                  },
                  divider: "ABOVE",
                  dividerWeight: "THIN",
                  marginAbove: "NONE",
                  marginBelow: "NONE"
                ),
                a!sectionLayout(
                  label: "",
                  contents: {
                    a!sideBySideLayout(
                      items: {
                        a!sideBySideItem(
                          item: a!textField(
                            label: "AxStation Access:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{75ea328f-e61b-49dc-a114-24fbe17510c3}deptAcc2',
                            saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{75ea328f-e61b-49dc-a114-24fbe17510c3}deptAcc2',
                            readOnly: true
                          ),
                          width: "4X"
                        ),
                        a!sideBySideItem(
                          item: a!textField(
                            label: "AxEVA Access:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2e1ef0ce-e242-44dc-997b-bb9124d59ef8}deptAcc3',
                            readOnly: true
                          ),
                          width: "4X"
                        ),
                        a!sideBySideItem(
                          item: a!textField(
                            label: "Project Name:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{797f8093-85fb-4e18-b4b9-e5e85a7ccbe7}projName',
                            saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{797f8093-85fb-4e18-b4b9-e5e85a7ccbe7}projName',
                            refreshAfter: "UNFOCUS",
                            readOnly: true,
                            validations: {},
                            align: "LEFT"
                          ),
                          width: "4X"
                        ),
                        a!sideBySideItem(
                          item: a!dateField(
                            label: "Start Date:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                            saveInto:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                            readOnly: true,
                            validations: {},
                            align: "LEFT"
                          ),
                          width: "MINIMIZE"
                        ),
                        a!sideBySideItem(
                          item: a!dateField(
                            label: "End Date:",
                            labelPosition: "ABOVE",
                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                            saveInto:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                            readOnly: true,
                            validations: {},
                            align: "LEFT"
                          ),
                          width: "MINIMIZE"
                        )
                      },
                      alignVertical: "TOP",
                      spacing: "SPARSE",
                      marginAbove: "NONE"
                    ),
                    a!sectionLayout(
                      label: "",
                      contents: {
                        a!sideBySideLayout(
                          items: {
                            a!sideBySideItem(
                              item: a!textField(
                                label: "Jama Access:",
                                labelPosition: "ABOVE",
                                value: ri!record['recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd8c4d85-bd9b-44e2-a2f0-60045bfdd5ed}JamaAccess'],
                                saveInto: {},
                                refreshAfter: "UNFOCUS",
                                readOnly: true,
                                validations: {}
                              ),
                              width: "5X"
                            ),
                            a!sideBySideItem(
                              item: a!textField(
                                label: "Jira Access:",
                                labelPosition: "ABOVE",
                                value:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{bed01faf-582d-4cad-8429-a66c4e4dcf05}jiraAccess',
                                saveInto: {},
                                refreshAfter: "UNFOCUS",
                                readOnly: true,
                                validations: {}
                              ),
                              width: "5X"
                            ),
                            a!sideBySideItem(
                              item: a!textField(
                                label: "Confluence Access:",
                                labelPosition: "ABOVE",
                                value:'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{46fba2da-0023-48c5-aba6-5b43e4743aa1}conAccess',
                                saveInto: {},
                                refreshAfter: "UNFOCUS",
                                readOnly: true,
                                validations: {}
                              ),
                              width: "10X"
                            )
                          },
                          alignVertical: "TOP",
                          spacing: "STANDARD",
                          marginAbove: "EVEN_LESS"
                        ),
                        a!sideBySideLayout(
                          items: {
                            a!sideBySideItem(
                              item: a!linkField(
                                label: "",
                                labelPosition: "COLLAPSED",
                                links: {
                                  a!recordLink(
                                    label: "Next",
                                    recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                                    identifier: rule!DS_NextID(),
                                    openLinkIn: "SAME_TAB"
                                  )
                                }
                              ),
                              width: "MINIMIZE"
                            )
                          },
                          alignVertical: "TOP",
                          spacing: "STANDARD",
                          marginAbove: "STANDARD"
                        )
                      },
                      divider: "ABOVE"
                    )
                  },
                  divider: "ABOVE",
                  dividerWeight: "THIN",
                  marginAbove: "NONE",
                  marginBelow: "NONE"
                )
              },
              width: "WIDE",
              showWhen: true
            )
          },
          alignVertical: "TOP",
          marginAbove: "NONE",
          marginBelow: "NONE",
          spacing: "SPARSE",
          showDividers: false
        )
      },
      divider: "ABOVE",
      marginAbove: "EVEN_LESS",
      marginBelow: "NONE"
    ),
    
    /* right bar */
    a!columnLayout(
    width: "EXTRA_NARROW",
    contents: {
    a!cardLayout(
    height: "MEDIUM",
    showShadow: true(),
    tooltip: "Navigate to Next Record",
    link: a!recordLink(
    recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
    identifier: local!nextNavId,
    openLinkIn: "SAME_TAB",
    showWhen: a!isNotNullOrEmpty(local!nextNavId)
    ),
    contents: {
    a!richTextDisplayField(
    value: a!richTextItem(
    size: "MEDIUM",
    text: {
    char(10), char(10), char(10),
    a!richTextIcon(
    icon: "arrow-right"
    )
    }
    )
    )
    }
    )
    }
    )
    }
    )
    }
    )
    )
    }

  • I tried to reply with an error I'm getting but it keeps being flagged as spam. I'm getting a CastInvalid error when trying to merge the side-column cards with my summary interface. I have a date data type in my record and this is the error I'm getting

    "Interface Definition: Expression evaluation error at function a!dateField [line 193]: Could not cast from Record Field to Date. Details: CastInvalidCould not cast from Record Field to Date. Details: CastInvalid"

  • 0
    Certified Lead Developer
    in reply to davinar9817
    I tried to reply with an error I'm getting

    Are you just pasting a bunch of text?  If so, please try with a screenshot snippet and/or using a Code Box instead.  Also may be able to help with the falsely-flagged responses.

  • No I was using the code boxes. Tried something different and got a column error instead;

    {
      a!localVariables(
    
        /* the following 2 local variables would be loaded by queries given the current record ID */
        local!previousNavId: 1234567896,
        local!nextNavId: 1234567894,
        
      a!sectionLayout(
        contents: {
          a!columnsLayout(
            alignVertical: "TOP",
            columns: {
    
              /* left bar */
              a!columnLayout(
                width: "EXTRA_NARROW",
                contents: {
                  a!cardLayout(
                    height: "MEDIUM",
                    showShadow: true(),
                    tooltip: "Navigate to Previous Record",
                    link: a!recordLink(
                      recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                      identifier: local!previousNavId,
                      openLinkIn: "SAME_TAB",
                      showWhen: a!isNotNullOrEmpty(local!previousNavId)
                    ),
                    
                    contents: {
                      a!richTextDisplayField(
                        value: a!richTextItem(
                          size: "MEDIUM",
                          text: {
                            char(10), char(10), char(10),
                            a!richTextIcon(
                              icon: "arrow-left"
                            )
                          }
                        )
                      )
                    }
                    
                  )
                }
              ),

  • 0
    Certified Lead Developer
    in reply to davinar9817

    That error message indicates you're trying to pass a SectionLayout component as a member of a ColumnsLayout "columns" array.  The sample code you've pasted here doesn't seem to go deep enough to show anything either way.

    Edit to add: thanks to April un-spamming your original reply containing the full code, i can see exactly where and how my prior assumption was correct.  Your "middle column" section layout is not contained in its own a!columnLayout() call, which would be required (check my original code to see how it should be).

  • Here's the entire current code:

    Now the error I'm getting is 

    "Expression evaluation error: Syntax error. Details: Expression evaluation error at function a!localVariables parameter 4 [line 47]: Missing right parenthesis in expression, found COMMA"

    {
      a!localVariables(
        /* the following 2 local variables would be loaded by queries given the current record ID */
        local!previousNavId: 1234567896,
        local!nextNavId: 1234567894,
        a!sectionLayout(
          contents: {
            a!columnsLayout(
              alignVertical: "TOP",
              columns: {
                /* left bar */
                a!columnLayout(
                  width: "EXTRA_NARROW",
                  contents: {
                    a!cardLayout(
                      height: "MEDIUM",
                      showShadow: true(),
                      tooltip: "Navigate to Previous Record",
                      link: a!recordLink(
                        recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                        identifier: local!previousNavId,
                        openLinkIn: "SAME_TAB",
                        showWhen: a!isNotNullOrEmpty(local!previousNavId)
                      ),
                      contents: {
                        a!richTextDisplayField(
                          value: a!richTextItem(
                            size: "MEDIUM",
                            text: {
                              char(10),
                              char(10),
                              char(10),
                              a!richTextIcon(icon: "arrow-left")
                            }
                          )
                        )
                      }
                    )
                    }
                    )
                  }
                ),
                }
                )
                
                a!sectionLayout(
                  label: "Additional Contractor Information",
                  labelIcon: "info-circle",
                  labelSize: "EXTRA_SMALL",
                  labelHeadingTag: "H2",
                  labelColor: "STANDARD",
                  contents: {
                    a!columnsLayout(
                      columns: {
                        a!columnLayout(
                          contents: {
                            a!sideBySideLayout(
                              items: {
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Name:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{6576c50e-e121-46f9-ac66-80f275bdd60b}firstName' & " " & 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{9ad498eb-f112-4373-9f83-98d98fe98f1d}lastName',
                                    readOnly: true,
                                    align: "LEFT",
                                    inputPurpose: "NAME"
                                  ),
                                  width: "AUTO"
                                ),
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Phone Number:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{f4c57b1e-a70b-4b5c-abfd-91fbfa77c38f}conPhoneNumber',
                                    readOnly: true,
                                    inputPurpose: "PHONE_NUMBER"
                                  ),
                                  width: "AUTO"
                                ),
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Email Address:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2952c2ae-aeb6-47f0-9655-0628f009e981}contractorEmail',
                                    readOnly: true,
                                    align: "LEFT",
                                    inputPurpose: "EMAIL"
                                  ),
                                  width: "AUTO"
                                ),
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Contractor Department:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{4b272b70-791f-4c19-a831-736b78fbd6b0}department',
                                    readOnly: true
                                  ),
                                  width: "AUTO"
                                )
                              },
                              alignVertical: "TOP",
                              spacing: "SPARSE",
                              marginAbove: "LESS"
                            ),
                            a!sectionLayout(
                              label: "",
                              contents: {
                                a!sideBySideLayout(
                                  items: {
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Axiom Manager Name:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{acd634c0-572b-45e4-9327-9a76ffa8ed82}mngrName',
                                        readOnly: true
                                      ),
                                      width: "AUTO"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Axiom Manager Email:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{3e72a18f-c6b9-4223-a4e9-37631f23a060}mngrEmail',
                                        readOnly: true
                                      ),
                                      width: "AUTO"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Company Name:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2476f354-8a05-4418-a463-61d9127ee99d}conCompanyName',
                                        readOnly: true,
                                        align: "LEFT"
                                      ),
                                      width: "AUTO"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Department Access:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{67465a62-d8e1-45b8-8c26-42d9daae509b}deptAcc1',
                                        readOnly: true
                                      ),
                                      width: "AUTO"
                                    )
                                  },
                                  alignVertical: "TOP",
                                  spacing: "SPARSE",
                                  marginAbove: "NONE"
                                )
                              },
                              divider: "ABOVE",
                              dividerWeight: "THIN",
                              marginAbove: "NONE",
                              marginBelow: "NONE"
                            ),
                            a!sectionLayout(
                              label: "",
                              contents: {
                                a!sideBySideLayout(
                                  items: {
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "AxStation Access:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{75ea328f-e61b-49dc-a114-24fbe17510c3}deptAcc2',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{75ea328f-e61b-49dc-a114-24fbe17510c3}deptAcc2',
                                        readOnly: true
                                      ),
                                      width: "4X"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "AxEVA Access:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2e1ef0ce-e242-44dc-997b-bb9124d59ef8}deptAcc3',
                                        readOnly: true
                                      ),
                                      width: "4X"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Project Name:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{797f8093-85fb-4e18-b4b9-e5e85a7ccbe7}projName',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{797f8093-85fb-4e18-b4b9-e5e85a7ccbe7}projName',
                                        refreshAfter: "UNFOCUS",
                                        readOnly: true,
                                        validations: {},
                                        align: "LEFT"
                                      ),
                                      width: "4X"
                                    ),
                                    a!sideBySideItem(
                                      item: a!dateField(
                                        label: "Start Date:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                                        readOnly: true,
                                        validations: {},
                                        align: "LEFT"
                                      ),
                                      width: "MINIMIZE"
                                    ),
                                    a!sideBySideItem(
                                      item: a!dateField(
                                        label: "End Date:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                                        readOnly: true,
                                        validations: {},
                                        align: "LEFT"
                                      ),
                                      width: "MINIMIZE"
                                    )
                                  },
                                  alignVertical: "TOP",
                                  spacing: "SPARSE",
                                  marginAbove: "NONE"
                                ),
                                a!sectionLayout(
                                  label: "",
                                  contents: {
                                    a!sideBySideLayout(
                                      items: {
                                        a!sideBySideItem(
                                          item: a!textField(
                                            label: "Jama Access:",
                                            labelPosition: "ABOVE",
                                            value: ri!record['recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd8c4d85-bd9b-44e2-a2f0-60045bfdd5ed}JamaAccess'],
                                            saveInto: {},
                                            refreshAfter: "UNFOCUS",
                                            readOnly: true,
                                            validations: {}
                                          ),
                                          width: "5X"
                                        ),
                                        a!sideBySideItem(
                                          item: a!textField(
                                            label: "Jira Access:",
                                            labelPosition: "ABOVE",
                                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{bed01faf-582d-4cad-8429-a66c4e4dcf05}jiraAccess',
                                            saveInto: {},
                                            refreshAfter: "UNFOCUS",
                                            readOnly: true,
                                            validations: {}
                                          ),
                                          width: "5X"
                                        ),
                                        a!sideBySideItem(
                                          item: a!textField(
                                            label: "Confluence Access:",
                                            labelPosition: "ABOVE",
                                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{46fba2da-0023-48c5-aba6-5b43e4743aa1}conAccess',
                                            saveInto: {},
                                            refreshAfter: "UNFOCUS",
                                            readOnly: true,
                                            validations: {}
                                          ),
                                          width: "10X"
                                        )
                                      },
                                      alignVertical: "TOP",
                                      spacing: "STANDARD",
                                      marginAbove: "EVEN_LESS"
                                    ),
                                    a!sideBySideLayout(
                                      items: {
                                        a!sideBySideItem(
                                          item: a!linkField(
                                            label: "",
                                            labelPosition: "COLLAPSED",
                                            links: {
                                              a!recordLink(
                                                label: "Next",
                                                recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                                                identifier: rule!DS_NextID(),
                                                openLinkIn: "SAME_TAB"
                                              )
                                            }
                                          ),
                                          width: "MINIMIZE"
                                        )
                                      },
                                      alignVertical: "TOP",
                                      spacing: "STANDARD",
                                      marginAbove: "STANDARD"
                                    )
                                  },
                                  divider: "ABOVE"
                                )
                              },
                              divider: "ABOVE",
                              dividerWeight: "THIN",
                              marginAbove: "NONE",
                              marginBelow: "NONE"
                            )
                          },
                          width: "WIDE",
                          showWhen: true
                        )
                      },
                      alignVertical: "TOP",
                      marginAbove: "NONE",
                      marginBelow: "NONE",
                      spacing: "SPARSE",
                      showDividers: false
                    )
                  },
                  divider: "ABOVE",
                  marginAbove: "EVEN_LESS",
                  marginBelow: "NONE"
                ),
                /* right bar */
                a!columnLayout(
                  width: "EXTRA_NARROW",
                  contents: {
                    a!cardLayout(
                      height: "MEDIUM",
                      showShadow: true(),
                      tooltip: "Navigate to Next Record",
                      link: a!recordLink(
                        recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                        identifier: local!nextNavId,
                        openLinkIn: "SAME_TAB",
                        showWhen: a!isNotNullOrEmpty(local!nextNavId)
                      ),
                      contents: {
                        a!richTextDisplayField(
                          value: a!richTextItem(
                            size: "MEDIUM",
                            text: {
                              char(10),
                              char(10),
                              char(10),
                              a!richTextIcon(icon: "arrow-right")
                            }
                          )
                        )
                      }
                    )
                  }
                  )
                )
                }
                
              
            
          

  • Here's the entire code, now I'm getting an error about line 47 missing a right parenthesis, presumably because the section layout isn't closed properly somewhere

    {
      a!localVariables(
        /* the following 2 local variables would be loaded by queries given the current record ID */
        local!previousNavId: 1234567896,
        local!nextNavId: 1234567894,
        a!sectionLayout(
          contents: {
            a!columnsLayout(
              alignVertical: "TOP",
              columns: {
                /* left bar */
                a!columnLayout(
                  width: "EXTRA_NARROW",
                  contents: {
                    a!cardLayout(
                      height: "MEDIUM",
                      showShadow: true(),
                      tooltip: "Navigate to Previous Record",
                      link: a!recordLink(
                        recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                        identifier: local!previousNavId,
                        openLinkIn: "SAME_TAB",
                        showWhen: a!isNotNullOrEmpty(local!previousNavId)
                      ),
                      contents: {
                        a!richTextDisplayField(
                          value: a!richTextItem(
                            size: "MEDIUM",
                            text: {
                              char(10),
                              char(10),
                              char(10),
                              a!richTextIcon(icon: "arrow-left")
                            }
                          )
                        )
                      }
                    )
                    }
                    )
                  }
                ),
                }
                )
                
                a!sectionLayout(
                  label: "Additional Contractor Information",
                  labelIcon: "info-circle",
                  labelSize: "EXTRA_SMALL",
                  labelHeadingTag: "H2",
                  labelColor: "STANDARD",
                  contents: {
                    a!columnsLayout(
                      columns: {
                        a!columnLayout(
                          contents: {
                            a!sideBySideLayout(
                              items: {
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Name:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{6576c50e-e121-46f9-ac66-80f275bdd60b}firstName' & " " & 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{9ad498eb-f112-4373-9f83-98d98fe98f1d}lastName',
                                    readOnly: true,
                                    align: "LEFT",
                                    inputPurpose: "NAME"
                                  ),
                                  width: "AUTO"
                                ),
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Phone Number:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{f4c57b1e-a70b-4b5c-abfd-91fbfa77c38f}conPhoneNumber',
                                    readOnly: true,
                                    inputPurpose: "PHONE_NUMBER"
                                  ),
                                  width: "AUTO"
                                ),
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Email Address:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2952c2ae-aeb6-47f0-9655-0628f009e981}contractorEmail',
                                    readOnly: true,
                                    align: "LEFT",
                                    inputPurpose: "EMAIL"
                                  ),
                                  width: "AUTO"
                                ),
                                a!sideBySideItem(
                                  item: a!textField(
                                    label: "Contractor Department:",
                                    labelPosition: "ABOVE",
                                    value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{4b272b70-791f-4c19-a831-736b78fbd6b0}department',
                                    readOnly: true
                                  ),
                                  width: "AUTO"
                                )
                              },
                              alignVertical: "TOP",
                              spacing: "SPARSE",
                              marginAbove: "LESS"
                            ),
                            a!sectionLayout(
                              label: "",
                              contents: {
                                a!sideBySideLayout(
                                  items: {
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Axiom Manager Name:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{acd634c0-572b-45e4-9327-9a76ffa8ed82}mngrName',
                                        readOnly: true
                                      ),
                                      width: "AUTO"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Axiom Manager Email:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{3e72a18f-c6b9-4223-a4e9-37631f23a060}mngrEmail',
                                        readOnly: true
                                      ),
                                      width: "AUTO"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Company Name:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2476f354-8a05-4418-a463-61d9127ee99d}conCompanyName',
                                        readOnly: true,
                                        align: "LEFT"
                                      ),
                                      width: "AUTO"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Department Access:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{67465a62-d8e1-45b8-8c26-42d9daae509b}deptAcc1',
                                        readOnly: true
                                      ),
                                      width: "AUTO"
                                    )
                                  },
                                  alignVertical: "TOP",
                                  spacing: "SPARSE",
                                  marginAbove: "NONE"
                                )
                              },
                              divider: "ABOVE",
                              dividerWeight: "THIN",
                              marginAbove: "NONE",
                              marginBelow: "NONE"
                            ),
                            a!sectionLayout(
                              label: "",
                              contents: {
                                a!sideBySideLayout(
                                  items: {
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "AxStation Access:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{75ea328f-e61b-49dc-a114-24fbe17510c3}deptAcc2',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{75ea328f-e61b-49dc-a114-24fbe17510c3}deptAcc2',
                                        readOnly: true
                                      ),
                                      width: "4X"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "AxEVA Access:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2e1ef0ce-e242-44dc-997b-bb9124d59ef8}deptAcc3',
                                        readOnly: true
                                      ),
                                      width: "4X"
                                    ),
                                    a!sideBySideItem(
                                      item: a!textField(
                                        label: "Project Name:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{797f8093-85fb-4e18-b4b9-e5e85a7ccbe7}projName',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{797f8093-85fb-4e18-b4b9-e5e85a7ccbe7}projName',
                                        refreshAfter: "UNFOCUS",
                                        readOnly: true,
                                        validations: {},
                                        align: "LEFT"
                                      ),
                                      width: "4X"
                                    ),
                                    a!sideBySideItem(
                                      item: a!dateField(
                                        label: "Start Date:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{74bb741e-33e8-4a03-b7d2-cb7266951563}startDate',
                                        readOnly: true,
                                        validations: {},
                                        align: "LEFT"
                                      ),
                                      width: "MINIMIZE"
                                    ),
                                    a!sideBySideItem(
                                      item: a!dateField(
                                        label: "End Date:",
                                        labelPosition: "ABOVE",
                                        value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                                        saveInto: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd408962-3380-4ac9-b6a5-fc87f4f8e8a3}endDate',
                                        readOnly: true,
                                        validations: {},
                                        align: "LEFT"
                                      ),
                                      width: "MINIMIZE"
                                    )
                                  },
                                  alignVertical: "TOP",
                                  spacing: "SPARSE",
                                  marginAbove: "NONE"
                                ),
                                a!sectionLayout(
                                  label: "",
                                  contents: {
                                    a!sideBySideLayout(
                                      items: {
                                        a!sideBySideItem(
                                          item: a!textField(
                                            label: "Jama Access:",
                                            labelPosition: "ABOVE",
                                            value: ri!record['recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{cd8c4d85-bd9b-44e2-a2f0-60045bfdd5ed}JamaAccess'],
                                            saveInto: {},
                                            refreshAfter: "UNFOCUS",
                                            readOnly: true,
                                            validations: {}
                                          ),
                                          width: "5X"
                                        ),
                                        a!sideBySideItem(
                                          item: a!textField(
                                            label: "Jira Access:",
                                            labelPosition: "ABOVE",
                                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{bed01faf-582d-4cad-8429-a66c4e4dcf05}jiraAccess',
                                            saveInto: {},
                                            refreshAfter: "UNFOCUS",
                                            readOnly: true,
                                            validations: {}
                                          ),
                                          width: "5X"
                                        ),
                                        a!sideBySideItem(
                                          item: a!textField(
                                            label: "Confluence Access:",
                                            labelPosition: "ABOVE",
                                            value: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{46fba2da-0023-48c5-aba6-5b43e4743aa1}conAccess',
                                            saveInto: {},
                                            refreshAfter: "UNFOCUS",
                                            readOnly: true,
                                            validations: {}
                                          ),
                                          width: "10X"
                                        )
                                      },
                                      alignVertical: "TOP",
                                      spacing: "STANDARD",
                                      marginAbove: "EVEN_LESS"
                                    ),
                                    a!sideBySideLayout(
                                      items: {
                                        a!sideBySideItem(
                                          item: a!linkField(
                                            label: "",
                                            labelPosition: "COLLAPSED",
                                            links: {
                                              a!recordLink(
                                                label: "Next",
                                                recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                                                identifier: rule!DS_NextID(),
                                                openLinkIn: "SAME_TAB"
                                              )
                                            }
                                          ),
                                          width: "MINIMIZE"
                                        )
                                      },
                                      alignVertical: "TOP",
                                      spacing: "STANDARD",
                                      marginAbove: "STANDARD"
                                    )
                                  },
                                  divider: "ABOVE"
                                )
                              },
                              divider: "ABOVE",
                              dividerWeight: "THIN",
                              marginAbove: "NONE",
                              marginBelow: "NONE"
                            )
                          },
                          width: "WIDE",
                          showWhen: true
                        )
                      },
                      alignVertical: "TOP",
                      marginAbove: "NONE",
                      marginBelow: "NONE",
                      spacing: "SPARSE",
                      showDividers: false
                    )
                  },
                  divider: "ABOVE",
                  marginAbove: "EVEN_LESS",
                  marginBelow: "NONE"
                ),
                /* right bar */
                a!columnLayout(
                  width: "EXTRA_NARROW",
                  contents: {
                    a!cardLayout(
                      height: "MEDIUM",
                      showShadow: true(),
                      tooltip: "Navigate to Next Record",
                      link: a!recordLink(
                        recordType: 'recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor',
                        identifier: local!nextNavId,
                        openLinkIn: "SAME_TAB",
                        showWhen: a!isNotNullOrEmpty(local!nextNavId)
                      ),
                      contents: {
                        a!richTextDisplayField(
                          value: a!richTextItem(
                            size: "MEDIUM",
                            text: {
                              char(10),
                              char(10),
                              char(10),
                              a!richTextIcon(icon: "arrow-right")
                            }
                          )
                        )
                      }
                    )
                  }
                  )
                )
                }
                
              
            
          

  • thanks for the tag! I approved your post. Sometimes our text repetition flag settings mistakenly get code snippets.

Reply Children