Hi everyone,
I’m working on my first Appian build and ran into an issue I haven’t been able to resolve. My save logic seems to save correctly to ri!record, but I’m getting an error related to the record type relationships.
ri!record
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error: xxxx must be indexed by its corresponding record type fields or relationships
I suspect the issue is tied to how my record type relationships are configured, but I haven’t been able to figure it out.
Has anyone encountered similar issues with saving data to a record type and relationship errors? I’d really appreciate any guidance on reviewing or troubleshooting the save logic and relationships.
Thanks in advance!
Discussion posts and replies are publicly visible
You first try this common fix with this type of generic issue, Change ri!record.fieldName or ri!record[fieldName] to ri!record[recordType!YourRecord.fields.fieldName] -> you must use record type field references.
Still could you share code snippet for better understanding if above basic change will not work.
Could I do this when saving a grid?:
Probably yes, but you might have to use the record type constructor
recordType!YourRecordType(
field: value
...
)
You’re updating with raw field names instead of the record type field references.
Use recordType!UC2335TinaSweep_uc2335DisclosureLog.fields.<fieldName> in a!update().
This was my latest attempt:
The record type behind uc2335DisclosureLog is what you'll want (edit - also added the correct way to use a!update()):
a!update()
a!save( ri!record[UC2335 TIN Sweep.uc2335DisclosureLog], a!update( a!defaultValue(ri!record[UC2335 TIN Sweep.uc2335DisclosureLog], recordType!UC2335 Disclosure Log()), { UC2335 Disclosure Log.disclosureText, UC2335 Disclosure Log.priceImpactIndicator, }, { local!draftDisclosures.disclosureText, local!draftDisclosures.priceImpactIndicator } ) )
I'm giving this a try now. Thank you so much for your help—I realize I've been at this for far too long and probably made it more complicated than it needed to be.
Yikes, it's been a log day :) I just cant seem to get past this:
You are still using dot-notation for the assigned values. I assume this local is of a record type.
Thanks, Stefan. I think I need to spend more time reviewing the documentation. I’m just a bit confused about the dot notation and cant keep spinning my wheels.
Thanks Shubham. I’m just a bit confused about the dot notation.