Hi
I am using query record to fetch data from the database.Whenever i am using query record to fetch image , its giving this error.
I am using this code to get the image displayed on the interface:
a!imageField( images: a!documentImage( document: todocument(index(ri!employee,'recordType!{89956f33-9ae6-45d8-9fb3-c45b6cc5877c} Request.fields.{87357f56-96ee-41b0-a7db-1972b5ab8161}imageid',null),)
), ),
Its giving me this error:
Could not display interface. Please check definition and inputs.Interface Def inition: Expression evaluation error at function a!imageField [line 4]: The image at index 1 in an image gallery component [label=""] has an invalid value for "document". "document" must not be null.
Discussion posts and replies are publicly visible
Looks like the document value in DB is null. Even if now, always add null check for values that allows null values. I think the indexing is wrong as well. The recordType is added to 2nd parameter even though first parameter is a rule input. This looks wrong. Is the rule input of the cdt type which has image id? is the data passed in that rule input? If not then just give record type by itself.