I have discovered something and would like to share it with the community, while at the same time would like to know if this is "safe" to be used, or whether the slightest code change in Appian might cause it to misbehave.A way of validating the uploaded file before submitting it, like validation on extension, file size, file name...etc.When searching in the forum, the answer is: "it is not possible to be done without actually submitting the form and doing the checks after submitting."But I have found a way to get it to work, and below is the method:In the validation of the upload fileUploadField, call the object a!fileUploadField, passing the variable "value:ri!MainImage", assuming you are saving into "ri!MainImage" and then calling any properties like "uploadedDocumentName" as needed. This has worked for me perfectly.Below is a code snippet:a!fileUploadField( label: "Main Image", labelPosition: "ADJACENT", ...
OriginalPostID-153370
Discussion posts and replies are publicly visible
Attaching an updated version - this one will better handle irregularly-named files such as "noExtension" or ".properties" - both versions of the evaluation will now work for both of these scenarios (i.e. files with no extension or *only* an extension).[To anyone subscribed to this thread, sorry for the barrage of emails this is probably causing - i hope some are finding this useful at least.]
New File Upload Properties Rule.sail
Hi Mike, this .contents.name solution does not work in 18.1. Has Appian changed these values? Or if you could tell where to find these properties.
My requirement is to capture the uploaded file's name; once the user uploads a file, and simultaneously display that name in an adjacent textfield. How do I achieve this?
Thanks!