Related action in read only grid

Hi All,

I have a scenario where i have to populate related action in one of the column in read only grid. For instance, the row with identifier 1 i will populate related action for identifier 2 in that specific column. The issue am facing is that even though i can open that related action with identifier 2, the name of related action is still showing like related action of identifier 1, 

Note: Am only facing this issue when am using a!recordData as source but I could get desired result when am using a!query record type.

You can try this scenario making one value in column as a!recordActionItem(action: record action, identifier: fv!identifier+1

Please suggest if am missing anything here.

Thanks in advance!

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Can you share some code snippets and a screen shot?

  • Data: a!query record type

    a!localVariables(
      local!rlmLoanDetails: a!queryRecordType(
        recordType: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details',
        filters: {
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{2d7edaf4-3e40-41c0-a89a-6f3995670e0e}isActive',
            value: true()
          ),
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{259fe683-f6b2-40b5-a60a-d9f9dc27872e}milestone',
            value: cons!RLM_LOOKUP_DATA_157
          )
        },
        pagingInfo: a!pagingInfo(1,5000),
        fields: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.relationships.{4a143561-e223-467d-bb67-c8ee80ed07c0}rlmAdditionalLoanDetail.fields.{6e0272c7-3872-44f0-a65b-d1889e68d550}leadLoan'
      ).data,
    
      a!sectionLayout(
        label: "Managed Loan",
        contents: a!gridField(
          labelPosition: "COLLAPSED",
          emptyGridMessage: "No data available",
          data: local!rlmLoanDetails,
          columns: {
            a!gridColumn(
              label: "Loan number",
              sortField: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{6a018376-f831-413a-af07-3cbbd02d619d}loanNumber',
              value: a!recordActionField(
                actions: a!recordActionItem(
                  action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}displayLoanSummary',
                  identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId']
                ),
                style: "LINKS",
                display: "LABEL"
              )
            ),
    
            a!gridColumn(
              label: "Related Loans",
              value: 
                a!recordActionField(
                  actions:  a!recordActionItem(
                      action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}displayLoanSummary',
                      identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId']+1
                    ),
                    style: "LINKS",
                    display: "LABEL"
                  ),
                 
              )
           
          
           
          },
          refreshAlways: true(),
          refreshAfter: "RECORD_ACTION",
          pageSize: cons!ACO_GRID_SIZE_TINY
        ),
        isCollapsible: true()
      )
    )




    Result



    Data: a!recordData
    a!localVariables(
      local!rlmLoanDetails: a!recordData(
        recordType: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details',
        filters: {
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{2d7edaf4-3e40-41c0-a89a-6f3995670e0e}isActive',
            value: true()
          ),
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{259fe683-f6b2-40b5-a60a-d9f9dc27872e}milestone',
            value: cons!RLM_LOOKUP_DATA_157
          )
        },
    
      ),
    
      a!sectionLayout(
        label: "Managed Loan",
        contents: a!gridField(
          labelPosition: "COLLAPSED",
          emptyGridMessage: "No data available",
          data: local!rlmLoanDetails,
          columns: {
            a!gridColumn(
              label: "Loan number",
              sortField: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{6a018376-f831-413a-af07-3cbbd02d619d}loanNumber',
              value: a!recordActionField(
                actions: a!recordActionItem(
                  action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}displayLoanSummary',
                  identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId']
                ),
                style: "LINKS",
                display: "LABEL"
              )
            ),
    
            a!gridColumn(
              label: "Related Loans",
              value: 
                a!recordActionField(
                  actions:  a!recordActionItem(
                      action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}displayLoanSummary',
                      identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId']+1
                    ),
                    style: "LINKS",
                    display: "LABEL"
                  ),
                 
              )
           
          
           
          },
          refreshAlways: true(),
          refreshAfter: "RECORD_ACTION",
          pageSize: cons!ACO_GRID_SIZE_TINY
        ),
        isCollapsible: true()
      )
    )


    Result


    Am getting same related action label name when am using a!recorddata even though am passing correct identifier. But only label is showing in wrong way, when i click on RA i could open the correct RA.

    Not sure why RA label not displaying properly when using a!recordData as source.

    Below is the way i have configured RA Display name

  • 0
    Certified Lead Developer
    in reply to Capt_Barbosa

    a!recordData is not meant to be used outside of grids. Reference: docs.appian.com/.../fnc_system_recorddata.html

    Why do you increase the identifier by 1?

  • a!recordData is not meant to be used outside of grids. Reference: docs.appian.com/.../fnc_system_recorddata.html

    Yes.  I just declared in local variable and using it in data parameter of read only grid. Even if i directly put a!recordData in data parameter am facing the same issue.


    Why do you increase the identifier by 1?

    I just showed the example. Even if the identifier is changed, the related action display name is not changing if we are using a!recordData as grid source.

  • 0
    Certified Lead Developer
    in reply to Capt_Barbosa

    Did you try to just display the values outside a record action?

  • Not sure if i understood what you mentioned. Anyway I have populated corresponding identifier in separate columns to understand what am passing as identifier for RA. In first row, even it is different identifier, RA display name is same. 


    Please let me know if this is helpful

    If i just change the source of data by using a!queryrecordtype instead of a!record data, am getting desired result as shown below

  • 0
    Certified Lead Developer
    in reply to Capt_Barbosa

    Does any of these columns include your "+1" logic?

    , is that something you can help us with? It really seems weird.

Reply Children
  • To demonstrate am using +1 logic in all columns. Sharing code below

    a!gridField(
      emptyGridMessage: "No data available",
      data: a!recordData(
        recordType: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details',
        filters: {
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{2d7edaf4-3e40-41c0-a89a-6f3995670e0e}isActive',
            value: true()
          ),
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{259fe683-f6b2-40b5-a60a-d9f9dc27872e}milestone',
            value: cons!RLM_LOOKUP_DATA_157
          )
        },
    
      ),
      columns: {
        a!gridColumn(
          label: "Loan Number Identifier",
          value: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId']
        ),
        a!gridColumn(
          label: "Loan number",
          sortField: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{6a018376-f831-413a-af07-3cbbd02d619d}loanNumber',
          value: a!recordActionField(
            actions: a!recordActionItem(
              action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}displayLoanSummary',
              identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId']
            ),
            style: "LINKS",
            display: "LABEL"
          )
        ),
        a!gridColumn(
          label: "Related Loans Identifier",
          value: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId'] + 1
        ),
        a!gridColumn(
          label: "Related Loans",
          value: a!recordActionField(
            actions: a!recordActionItem(
              action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}displayLoanSummary',
              identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}RLM Loan Details.fields.{1f75d98b-f357-4136-82a7-bf333120f592}rlmId'] + 1
            ),
            style: "LINKS",
            display: "LABEL"
          ),
    
        )
      },
    
    )


    It doesn't need to be adding +1 to identifier. Even if i pass any random identifier for related action, the display name of RA remains same like specific row's RA.

  • 0
    Certified Lead Developer
    in reply to Capt_Barbosa

    The problem with that "+1" logic is, that it complicates the whole topic unnecessarily. And you want others to be able to reproduce that issue easily.

  • 0
    Certified Senior Developer
    in reply to Capt_Barbosa

    Corrected your code, Please verify in your interface
    For identifier we can directly pass fv!row "+1" is not required for identifier.

    a!gridField(
      emptyGridMessage: "No data available",
      data: a!recordData(
        recordType: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}',
        filters: {
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.fields.{2d7edaf4-3e40-41c0-a89a-6f3995670e0e}',
            value: true()
          ),
          rule!ACO_filterEqualsOrIn(
            field: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.fields.{259fe683-f6b2-40b5-a60a-d9f9dc27872e}',
            value: cons!RLM_LOOKUP_DATA_157
          )
        }
      ),
      columns: {
        a!gridColumn(
          label: "Loan Number Identifier",
          value: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.fields.{1f75d98b-f357-4136-82a7-bf333120f592}']
        ),
        a!gridColumn(
          label: "Loan number",
          sortField: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.fields.{6a018376-f831-413a-af07-3cbbd02d619d}',
          value: a!recordActionField(
            actions: a!recordActionItem(
              action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}',
              identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.fields.{1f75d98b-f357-4136-82a7-bf333120f592}']
            ),
            style: "LINKS",
            display: "LABEL"
          )
        ),
        a!gridColumn(
          label: "Related Loans Identifier",
          value: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.fields.{1f75d98b-f357-4136-82a7-bf333120f592}'] + 1
        ),
        a!gridColumn(
          label: "Related Loans",
          value: a!recordActionField(
            actions: a!recordActionItem(
              action: 'recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.actions.{05cd73c9-ce7f-4dc4-8b3f-5d00258e9b6b}',
              identifier: fv!row['recordType!{b4241a8a-8490-4326-9a66-74ae61f7935f}.fields.{1f75d98b-f357-4136-82a7-bf333120f592}']
            ),
            style: "LINKS",
            display: "LABEL"
          )
        )
      }
    )

  • Hi LakshmiRaja,

    Thanks for your response. Actually its nothing to do with +1 logic. I think i have confused everyone by adding +1 to the identifier for other column. 
    The reason i put +1 is to show that am giving different value as identifier other than the row identifier. The identifier can be any value, but problem am facing here is the display name of the RA which is showing corresponding row identifier's RA display name. Even though I pass different identifier for that column.

  • I can reproduce this behavior - I'd suggest opening a case with Appian Support to have them investigate this further.