I want to perform the null handling for the photos which are not available for a particular user.
Here I'm fetching an user details from a database, I intentionally made that photo field to null for a particular user then I'm getting the following error
Interface Definition: Expression evaluation error at function a!imageField [line 37]: The image at index 1 in an image gallery component [label=“Photo”] has an invalid value for “document”. “document” must not be null.
labelPosition: "ADJACENT", images: a!documentImage( document: local!getemp.photo, )
my requirement is, If the photo field is null for a particular user it should display empty and if the user is having a photo then it should display picture (This is not an user photo, this is a dummy photo which i uploaded from another interface to table)
As per my knowledge you can not display empty image field. You can do the workaround for it.
Define one default photo in your database and when the photo for the user is null display that default photo.
I think I've got a treat for you. You can get the Appian default image document id by using the code sample below.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.