I'm doing the step-by-step guide for appian developer where we're recreating the Acme Automobile example application and I encountered an error when trying to display the vehicle images in the grid.
I followed all the points in the step by step guide exactly and the error I keep encountering is the following:
Expression evaluation error at function a!gridField_23r3 [line 51]: A grid component [label="null"] has an invalid value for "columns". A grid column [label="Image"] has encountered an error. Expression evaluation error at function a!imageField [line 5]: User Does Not Have Rights to Perform this Operation
The expression I'm using to display the image is the following:
if( a!isNullOrEmpty( fv!row[recordType!W#SA Vehicle.fields.image] ), a!EXAMPLE_DOCUMENT_IMAGE(), fv!row[recordType!W#SA Vehicle.fields.image] )
where the W#SA is only a placeholder and I have replaced it with my own prefix of course (references work).
If anyone has any suggestions or guidance for why this might have happened please let me know.
Thanks.
Discussion posts and replies are publicly visible
This is a known problem. I suggest to write to academy@appian.com.
Thanks for the reply. If it's a known problem there's probably a know solution to this?
I will write to the e-mail you provided and if I get a known solution for this I'll post it here. Who knows it might help someone in the future
So, I've managed to find out the root cause for this - replying here to you if you might let someone know.
The issue here was that the initial DB created by appian on the learning servers (AFAIK this is only on the germany server) adds one row to the database where the image field is set to a number and not left empty. In my case the number was set to 11191 in the very last row. This represents an ID by which the image is found and since there is no initial images in the application folders the runtime crashed with the error reported above.
My current fix was to add a condition to look for this ID and ignore it (show the default image in that case also).
I'm guessing that a permanent fix would be to look at the scripts which create the initial database for this learning project (table AS Vehicle) and make sure the image rows are all set to empty. Not sure how and when these tables are created but this was the issue.
Thanks!
Thank you very much for this info. I really hope Appian refines the deployment script to avoid this issue. I know that someone at Appian is aware of it.
Hi centrihjan !
Thank you for reaching out! As others have noted, this is a known issue with a workaround fix listed in this discussion thread. While the issue has been fixed for all new workspaces, workspaces that were generated prior to the fix will still have the issue.
If you have any questions, or run into any other issues, send an email to academyonline@appian.com and we can support further.
Greg, thank you for the explanation :-)
Hi, you can use a!imageField and in the image field there is an option called "images", in that field you can configure a!documentImage and in the document you can configure your field to show the images. I think it will be helpful for you.