Skip to main content
danielc7216
April 1, 2024
Solved

Using Record type query from an expression in an interface

  • April 1, 2024
  • 4 replies
  • 0 views

Good day, I am new to Appian, I am trying to use the specific values in a return from a record query in a portal interface.

I am using the interface for a customer data card using an expression, I now want to expand the information on the card to include bank branch information (name, address, etc)

I have an expression that gets the branch information from a record type based on the branch Id and I am calling that into a local variable in the interface.

My problem is that I do not know how to access specific parts of that local variable in order to display the data.

I have tried a read only grid but get an error

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 105]: A grid component [label="Read-only Grid"] has an invalid value for "columns". A grid column [label="Branch Id"] has encountered an error. Expression evaluation error: BNK Branch can only be indexed into using square brackets or the index function

The data coming from the expression is

BNK Branch
branchId8(Number (Integer))
branchName"EATON FOOD Court"(Text)
street"290 Yonge Street"(Text)
city"Toronto"(Text)
postalCode"M5B 1C8"(Text)
province"Ontario"(Text)
isDeletedfalse(Boolean)
createdByregina.wilson@greenlightconsulting.com - Regina Wilson​(User)
createdOn10/30/2023 11:22 AM EST(Date and Time)
modifiedByregina.wilson@greenlightconsulting.com - Regina Wilson​(User)
modifiedOn10/30/2023 11:27 AM EST(Date and Time)

Could someone help me out?

    Best answer by danielc7216

    Never mind I solved it I had to reference the local variable with 

    local!branch['recordType!BNK Branch.fields.branchName']

    Thank you for getting back to me so quick.

    docs.appian.com/.../reference-records.html

    4 replies

    karumurua531442
    April 1, 2024

    Hi [mention:0126fbd913214613885070eadce28de8:e9ed411860ed4f2ba0265705b8793d05]  could you share the snap shot of your code please looks likes indexing error on your record data

    danielc7216
    danielc7216AuthorAnswer
    April 1, 2024

    Never mind I solved it I had to reference the local variable with 

    local!branch['recordType!BNK Branch.fields.branchName']

    Thank you for getting back to me so quick.

    docs.appian.com/.../reference-records.html

    karumurua531442
    April 1, 2024

    Yeah it is an indexing error 

    April 2, 2024

    [mention:0126fbd913214613885070eadce28de8:e9ed411860ed4f2ba0265705b8793d05]  in Records we Index using recordType.fields.columnname .

    in such way we can get any column value from Record.