Skip to main content
vaishals
August 30, 2023
Solved

Related action in read only grid

  • August 30, 2023
  • 15 replies
  • 0 views

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!

Best answer by peter.lewis

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

15 replies

stefanhelzle0001
Brainy
August 30, 2023

Can you share some code snippets and a screen shot?

vaishals
vaishalsAuthor
August 31, 2023

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


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

stefanhelzle0001
Brainy
August 31, 2023

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?

August 31, 2023

Hi 
Please try below logic in Interface

a!cardLayout(
  contents: a!gridField(
    data: 'recordType!{1e3f625b-dbca-4db6-969b-950bb182955b}AIS Request',
    columns: {
      a!gridColumn(
        label: "Request ID",
        sortField: 'recordType!{1e3f625b-dbca-4db6-969b-950bb182955b}AIS Request.fields.{c40cd374-cceb-4121-86ce-7375ae9c0c4d}id',
        align: "CENTER",
        value: a!recordActionField(
          display: "ICON",
          actions: a!recordActionItem(
            action: 'recordType!{1e3f625b-dbca-4db6-969b-950bb182955b}AIS Request.actions.{bf974385-c2a4-4c1d-8adb-b712ae80282f}updateRequest',
            identifier: fv!row['recordType!{1e3f625b-dbca-4db6-969b-950bb182955b}AIS Request.fields.{c40cd374-cceb-4121-86ce-7375ae9c0c4d}id']
          )
        )
      ),
      a!gridColumn(
        label: "Description",
        sortField: 'recordType!{1e3f625b-dbca-4db6-969b-950bb182955b}AIS Request.fields.{efca005e-588c-4c84-b7e9-d2d972fa9c74}description',
        value: fv!row['recordType!{1e3f625b-dbca-4db6-969b-950bb182955b}AIS Request.fields.{efca005e-588c-4c84-b7e9-d2d972fa9c74}description']
      )
    },
    validations: {},
    refreshAfter: "RECORD_ACTION",
    showSearchBox: true,
    showRefreshButton: true,
    recordActions: {
      a!recordActionItem(
        action: 'recordType!{1e3f625b-dbca-4db6-969b-950bb182955b}AIS Request.actions.{9fa223ca-faa8-4d94-bcca-1dae1b2f71a4}newRequest'
      )
    }
  ),
  shape: "ROUNDED",
  showShadow: true
)

Thank you.