I'm getting this error in my application
I call the interface with the upload field in the forms and at one of the primary buttons i call the function a!submitUploadedFiles(). "at function a!buttonWidget".
I cant understand what can i do for this to work. Already checked the version of the buttons and forms. It's all up to date.
Can some help me ?
Discussion posts and replies are publicly visible
I forgot to say. My objective is to save the size of the document instantly after the upload. The fuction submitUploadedFiles() let me use the fv!file.size only in validations... But i need to save it... Appian could make it to the saveInto too :D :D
nunof466265 said: Appian could make it to the saveInto too
I've been asking for this feature for years. You should go and upvote (and comment on) my Old Feature Request Thread, so more people will see it.
The answer to your original question is: a!submitUploadedFiles() (sadly) can not be used in a process task (task or start form) at all. You'll need a different work-around.
I tried to replicate your requirement, have a look at it(v25.3).
a!localVariables( local!document, local!documentSize, a!formLayout( contents: { a!fileUploadField( label: "Upload Document", target: {}, /*Replace this with you target folder*/ value: local!document, saveInto: { local!document, /* Handle list of documents */ a!save( local!documentSize, if( or(isnull(local!document), length(local!document) = 0), null, document(local!document[1], "size") /* Get first document */ ) ) }, maxSelections: 1 /* Limit to single file */ ), /* Display the captured size */ a!textField( label: "Document Size (bytes)", value: local!documentSize, readOnly: true ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Submit", submit: true, saveInto: { /* Your other save logic here */ } ) } ) ) )
With version 25.3, Appian supports access to file properties directly in the interface where the file is uploaded.
a!submitUploadedFiles() is, as per the documentation, specifically meant to support file uploads in portals only.
We use the version 25.1 and I dont have the power to improve when i wishSo, in this version 25.1 we can see the file properties in the interface (Confirm). But how can save the size of the file in one rule input ? :D Thank you for your time!
I used it in an test interface. I'm using 25.1 version of Appian.This error appears
It's because the document isn't saved anywhere and i can't access the document function because i dont have AppianDocId, i guess. Is that correct ?
Thanks a lot Mike!Hope we can make noise to them hear us!
Best regards, Nuno
No, Actually you are currently on 25.1 and 25.3 improved the file upload handling to make document properties available immediately in saveInto.
Shubham Aware said:25.3 improved the file upload handling to make document properties available immediately in saveInto.
checking on this now - if they did that it would be amazing, and it makes me wonder why they didn't announce it (I do see there's an exciting new change in the Release Notes that I didn't notice before).
Edit: is the real update actually in the document() function then? In that it now allows access to properties of a just-uploaded file...Update: yup, it works as they promised!...
Here is a similar thread for your reference!