Hi, I am making an Asset Management application.
I have a functionality which allows me to create new assets with information such as asset name and asset Id. There is also an ability to add images of the asset in the interface where I have used the a!fileuploadfield which points to a constant which is a folder that stores the images. Here is the code for the same.
/*a!fileUploadField(*/ /*label: "Asset Image",*/ /*labelPosition: "ABOVE",*/ /*target: cons!G1_folderAssetImages,*/ /*value: ri!G1_Assets.imageId,*/ /*saveInto: ri!G1_Assets.imageId,*/ /*required: true,*/ /*validations: {}*/ /*),*/
I want to make a summary view (Interface) which shows all the information about the asset along with its image. But as of now I am just able to show the image id. Is there any way I can dsiaplay the image in this new interface?
Discussion posts and replies are publicly visible
You're trying to display the image before submitting the form - this won't work. Prior to form submission, newly-uploaded files are only stored in a special "temporary" location in the Appian back-end, and are not accessible via regular functions, even document(), documentImage(), etc. After a "submit" click, the document is moved to its proper destination and these things will work as expected.
What you'll need to do here is have the user upload any image(s) and submit the form, then have your process chain to a new task (or even back to the same form) whereupon the image in question will be ready to be displayed.
Mirroring my answer from above, in case it gets buried:
Additionally, at times like this, it would be helpful for you to post more fully-inclusive code snippets or screenshots (i.e. your whole form or at least all relevant parts thereof, with sensitive parts snipped or redacted), as well as a screenshot of your process flow, because without these we're forced to do a lot of guesswork.
I got it. This worked. Thankyou so much.