Skip to main content
esuo
February 2, 2022
Question

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

  • February 2, 2022
  • 15 replies
  • 0 views

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?

15 replies

gopalk2865
Participating Frequently
February 2, 2022

Hi Esu, Not sure what was the question in that exercise. Could you please write here , what were you trying to do?

esuo
esuoAuthor
February 3, 2022

After completing the "Records Part 1 Exercise" in the Appian Developer Learning path, I saw that error when I clicked on a record from the record list to view its summary page

esuo
esuoAuthor
February 2, 2022

Sidenote: the error occurs when I click the link of a record in the record list grid

gopalk2865
Participating Frequently
February 2, 2022

Can you paste your code here if possible?

esuo
esuoAuthor
February 6, 2022

Here are a few screen snips

peter.lewis
Employee
February 2, 2022

This error likely means that somewhere in your app you have a variable that is a record data type and you are trying to to reference "fields" out of this. I'd suggest doing a CTRL+F in your interface or expression to look for the string "fields", since you probably have a syntax error there.

esuo
esuoAuthor
February 4, 2022

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

gopalk2865
Participating Frequently
February 4, 2022

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.

prateekk133349
March 22, 2024

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 : 

peter.lewis
Employee
March 22, 2024

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.