How populate a Read Only Grid using a ER

Certified Associate Developer

Hello

I need to create a summary I have two sections, one of them with date information In the other one  I need to use a Read Only Grid, to show I created a ER. to return data using an Id, but I don`t know how used the ER, in the Read Only Grid. I don't know what to put in the expression field

Someone could you help me please?

Best  regards

  Discussion posts and replies are publicly visible

Parents
  • That expression field is just used for testing - if you have an ID you want to use you can just put the number directly in that field to test your expression rule. Does your expression rule work on its own? If so, you should be able to plug in the results of your expression rule as the "data" parameter in the read only grid. If that doesn't work, can you provide more information? Specifically if you provide the expression for your expression rule and your interface expression that can help us make suggestions. Also if you add code please use Insert > Insert Code to make it easy to read.

  • 0
    Certified Associate Developer
    in reply to Peter Lewis

    Hello

    thanks for you help.

    When I created a ER and test , everything is OK, Test of my ER

    This is the code, I have two record type (expense and requesterInfo) and the FK is in the expense table is (idreqinfo) which is joined with id in the table  requesterInfo., Here everyting is OK

    a!queryRecordType(
      recordType:  'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense', 
       fields: {
        'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.relationships.{9a441a7e-5c42-4313-bdaf-9eed44a21b4d}pcRequesterInfo.fields.{e40c4dec-ebe2-455f-b680-9021c31f357b}startdate',
        'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.relationships.{9a441a7e-5c42-4313-bdaf-9eed44a21b4d}pcRequesterInfo.fields.{d00ffb9f-ce95-46e5-9db1-401acf2ae284}enddate',
        'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.fields.{7a76d3a5-e6da-4499-a397-b1793f908f65}exactdate',
        'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.fields.{f6db5b09-0085-428a-b6ac-3601dd5216c8}descriptionexpense',
        'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.fields.{e806b9fe-3063-4687-af7d-d1327b0cf31b}expensetype',
        'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.fields.{de0cf724-3ff1-42b9-8253-ee02eb18e183}amount',
            
          
       },
       filters: {
         a!queryFilter(
           /*field: 'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.fields.{79efa416-8a4d-4cee-928f-8d7c696e03bd}id',*/
          field: 'recordType!{381ac2e2-b371-4fc1-bdb2-fc18661b3de4}PC Expense.fields.{a493011d-d2ff-41f7-a415-f066f778c2e4}idreqinfo',
          operator: "=",
          value: ri!expReqId
         )
       },
    
       pagingInfo: a!pagingInfo(
         startIndex: 1,
         batchSize: 100,
         )
    ).data

    So. I need created a grid and populated with expense information, I created a ER, to returns ONLY expense information but when try to use in the interface, it is not working.

    I am setting DATA with 

    And

    I click in save and this error is returned

    What kind information I need set here: Configure Inputs

    Could you help me, please?

    Best regards

  • 0
    Appian Employee
    in reply to Anam0004

    Thanks for the detailed explanation! There's actually an easier way to do this if you want to display record data in a grid. Instead of creating a separate expression rule, you can set the source of your grid to be a record type. Then, you can use any of the fields in your columns (including related data).

    The other thing to keep in mind is that in your section for configuring inputs, you need to define which record ID is going to return items for the grid. If you're showing this on a record summary view, you likely don't want this to always be the same value - instead, you want it to change based on which record view you're looking at. In order to configure that, your expReqId should reference a rule input in your interface so you can dynamically pass the results of your record.

  • 0
    Certified Associate Developer
    in reply to Peter Lewis

    Hello,

    Thanks for your help

  • hello how could you solve it?
    I need to do the same thing, show a record type but change in each view

  • 0
    Appian Employee
    in reply to schavez

    Can you add more context? What do you mean by "show a record type but change in each view" - does this mean you're showing different records in different views? Different columns? Different filters? Adding screenshots or sample code can help us understand what you're trying to do.

    Also in general I recommend creating a new post rather than commenting on posts that are more than a year old - since we're constantly adding new features, there are often better / newer ways to do things!

Reply Children
No Data