Hello There,
I am getting this error,:"Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!imageField [line 182]: The image at index 1 in an image gallery component [label="Image"] has an invalid value for "document". "document" must not be null."
Visibility: not(rule!FOV_ISNull('recordType!{cdcf96e7-71f5-4a66-90e4-9d29efd1a922}FOV Vehicle.fields.{7924e1ce-3938-4fbb-aae4-8636d37e830c}imageId'))
a!documentImage( document: ri!record['recordType!{cdcf96e7-71f5-4a66-90e4-9d29efd1a922}FOV Vehicle.fields.{7924e1ce-3938-4fbb-aae4-8636d37e830c}imageId'], showWhen: not(rule!FOV_ISNull('recordType!{cdcf96e7-71f5-4a66-90e4-9d29efd1a922}FOV Vehicle.fields.{7924e1ce-3938-4fbb-aae4-8636d37e830c}imageId')))
I have a list of cars some have images other not (null), How can I fix it?
Discussion posts and replies are publicly visible
Hello Ernesto De La Pena Molina,
I guess in your case the imageId value exists but document related to that id does not exist in Knowledge center.
In this case you can check the object existence in KC by using check-object-existence plugin before showing your document.
Hi, To avoid this error , you can place a null check like this
if( a!isNotNullOrEmpty(todocument(ri!record['recordType!{cdcf96e7-71f5-4a66-90e4-9d29efd1a922}.fields.{7924e1ce-3938-4fbb-aae4-8636d37e830c}'])), {}, a!documentImage( document: ri!record['recordType!{cdcf96e7-71f5-4a66-90e4-9d29efd1a922}.fields.{7924e1ce-3938-4fbb-aae4-8636d37e830c}'], showWhen: not(rule!FOV_ISNull('recordType!{cdcf96e7-71f5-4a66-90e4-9d29efd1a922}.fields.{7924e1ce-3938-4fbb-aae4-8636d37e830c}')) ) )
Thanks!! Your code fixed it.