Hi All,
I have a requirement to upload attachments to a target folder location and assign them before perform submit on UI screen. Is there ant way I can achieve this?
Thanks in advannce.
Discussion posts and replies are publicly visible
/*If I pass the integration call in onSuccess part & submit:True for the button -> File uploaded in Appian & Integration not called*/ buttons: { a!buttonWidget( label: "Button", style: "NORMAL", saveInto: { a!submitUploadedFiles( onSuccess: { a!save(local!submissionSuccessful, true), a!save( local!responseData, rule!File_Upload_Check(doc: local!file, doc_Type: "Test_Dummy").result.body.success ) }, onError: { a!save(local!submissionSuccessful, false), a!save(local!errorCode, fv!error) } ) }, submit: true, validationGroup: "Test" ) } /*If I pass the integration call in onSuccess part & submit: True has been commented for the button -> File not uploaded & Appian Integration not called at all*/ buttons: { a!buttonWidget( label: "Button", style: "NORMAL", saveInto: { a!submitUploadedFiles( onSuccess: { a!save(local!submissionSuccessful, true), a!save( local!responseData, rule!File_Upload_Check(doc: local!file, doc_Type: "Test_Dummy").result.body.success ) }, onError: { a!save(local!submissionSuccessful, false), a!save(local!errorCode, fv!error) } ) }, /*submit: true,*/ validationGroup: "Test" ) } /*If I pass the integration call in as 2nd saveinto part next to a!submitUploadedFiles function & submit:True for the button -> File not uploaded & Appian Integration not called*/ buttons: { a!buttonWidget( label: "Button", style: "NORMAL", saveInto: { a!submitUploadedFiles( onSuccess: { a!save(local!submissionSuccessful, true) }, onError: { a!save(local!submissionSuccessful, false), a!save(local!errorCode, fv!error) } ), a!save( local!responseData, rule!File_Upload_Check(doc: local!file, doc_Type: "Test_Dummy").result.body.success ) }, submit: true, validationGroup: "Test" ) }
Hi Mike - Thanks for your suggestion. Please find the code & let me know your thoughts
i was more hoping you'd edit your original comment, but this works too i guess
So i've recreated something similar in my CE site, and I can't get the form (When viewed as a portal) to call the integration correctly at all - I just get a generic message, "The system has encountered an Error". This is even when trying to call the integration on a tiny document I pre-loaded into my filesystem and reference via a constant. The same thing works fine when I try it from the Interface Designer.
Hi Mike - Thanks for your response. I made some changes and first button with "Submit: true" will save the doc in Appian & I used 2nd button to call the process model in which I configured the integration as smart service which worked
That's a good idea. Did you happen to try putting both of those functions in the same button? I'm curious whether it'll work at this point. I expect *something* along these lines should.
@sharathp0003in Appian 23.3 appian introduce a!submitUploadedFiles() function in this function you can use in save into parametar for the upload file without form submission