Hi All,
First, some background: many of us still remember a time when using validations based on uploaded document properties (name, extension, size, etc) in a!fileUploadField() was not "officially" possible and therefore some of us were forced to resort to unsupported functionality to access these properties from just-uploaded documents, for various use cases. The most common use case, of course, was validating that uploaded files were of the correct type (extension), and thankfully a few versions ago, Appian added the fv!files property to the component, to access the important properties of uploaded documents.
Unfortunately, the fv!files feature was was only added to the Validations parameter, leaving a few other use cases not "officially" possible using supported functionality. To me, the most obvious of these use cases is:
I want to have a text field next to my a!fileUploadField component, which will pre-populate with the name of an uploaded document, and will be editable by the end user. The value of that field will then be used within the "fileNames" parameter of the file upload field, in such a way that any edits made by the user are saved as the uploaded document's name within Appian. (Note: to clarify, the specific part of this scenario that isn't possible is the ability to pre-populate the name of an uploaded file into another variable for use in a text field.)
Therefore, it would be incredibly useful if the saveInto Parameter could access the fv!files data in such a way as to allow us to duplicate any of the contained properties off to other rule inputs, local variables, etc.
Other use cases could include setting external variables due to specific extensions being uploaded, or specific sizes or size ranges, etc - there are probably dozens of valid edge cases that this feature would satisfy which now aren't possible unless using unsupported workarounds. Additionally, from an outside perspective at least, I would think this would have a high likelihood of being a low-effort add on the part of Appian's product engineers, since it would in certain ways duplicate the functionality currently enabled in the validations parameter of this component.
Everyone please let me know what you think.Thanks!
EDIT, 6 years later...It turns out in 25.3 they've finally improved the File Upload experience, most notably with an update to the classic document() function, allowing it to now have full access to the properties of a newly-uploaded document PRIOR to form submission. This effectively enables everything that was (officially) unsupported originally, necessitating this feature request.
Discussion posts and replies are publicly visible
6 Years ago someone tried to improve Appian in a way... This week i got a problem where a saveInto with the fv!files could solve everything and we cant use it... I needed to use the a!submitUploadedFiles() function so i cant use document() function after to save property "size" of the document. And this is just an example... More and more people need to use it for other rules and in other ways... Please listen and solve this "little" problem so we can use Appian easily!
Appian Website Appian AppMarket
Appian Max Team
Appian AppMarket Thanks!
So it turns out - in 25.3 they have now Enhanced the Document() Function such that it allows access to just-uploaded files, meaning we no longer need to hassle with trying to submit the uploaded file before determining on-form behavior. It's not QUITE as elegant as the "fv!files" approach I was envisioning (which would have worked similarly to the same property in the validations parameter for instance), but it effectively overcomes all other obstacles.
(thanks to Shubham Aware for pointing out what I'd obviously missed in the 25.3 release notes! lol...)
Anytime! Glad I could Help.