Expression evaluation error : Invalid index: Cannot index property 'fields' of type Text into type RecordType (APNX-1-4291-001)

Certified Associate Developer

I'm getting this error after completing Exercise 5_Records Part 1 in the Appian Developer learning path. I reviewed the steps, and I still don't know what's causing it. Can anybody tell me what's causing this and how to resolve it?

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer
    in reply to Esu Obu

    it should be the same record type for which you are creating the summary view.

  • As someone who just did this, it's not a syntax error... well kind of. Make sure your expressions -- especially in your Views & Headers, under Record Title -- have absolutely correct syntax. Your dot notation should transform into something cleaner. Your "Here are a few screen snips" comment on here shows exactly that. See how your "AX Vehicle.vehicleYear" dot notation isn't just raw text? It's transformed into autosuggested text.

    That's what you need, and that was what my problem was. 

  • Hi Esu, you take this expression for the summary page Title.

    rv!record[recordType!AX Vehicle.fields.vehicleYear] & " " &
    rv!record[recordType!AX Vehicle.fields.vehicleMake] & " " &
    rv!record[recordType!AX Vehicle.fields.vehicleModel]

    can you check the datatype of vehicleModel and vehiclemake filed? Both field is Text datatype but VechicleYear field has a Number (Integer) datatype so cannot take different datatype to show the title.

    I take this expression.


    rv!record[recordType!AX Vehicle.fields.vehicleMake] & " " &
    rv!record[recordType!AX Vehicle.fields.vehicleModel]

    This Expression is perfectly run and shows the title page with the Make and Model filed for a specific record.

  • 0
    Certified Associate Developer

    I Solved this , issue , Actually this problem is coming due to incorrect guidance in the Activity Pdf , It's told to use recordtype! even when we are using rv! (which automatically refer our record type).

    Sharing before after -

    Removing highlighted value will resolve the issue  , Appian is expecting fields and we are passing recordtype .

    Right way is this : 

  • 0
    Appian Employee
    in reply to PrateekKhanna

    Keep in mind that the expression example shown above is actually the expression to use - if you copy/paste the expression in with recordType! it will then show the nice formatted tags you see in your screenshot.