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

Parents Reply Children
  • 0
    Certified Associate Developer
    in reply to Peter Lewis

    I checked  all my related expressions and interfaces, but I didn't find any syntax error... I wish the Appian error told me the exact object causing it..

  • 0
    Certified Senior Developer
    in reply to Esu Obu

    HI Esu, As Peter said it may be happening because of you are itrying to index "fields" from record type. It wont be possible for us to locate the exact issue without seeing the code you are using.

  • 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.