Hello,
When I press a button right now it generates a excel file but I want at the same time to generate the excel file and also execute stored procedure, is there such a way, with one click of the button ?
a!buttonArrayLayout( a!buttonWidget( label: "Excel", saveInto: { a!exportDataStoreEntityToExcel( entity: cons!BBO_OpportunitiesReportExcelDataStore, documentName: "Excel Export " & now(), saveInFolder: cons!BBO_ReportsFolderPointer, onSuccess: a!save( local!exportDocId, fv!newDocument, ), /*This displays an error if there is an issue executing the the save*/ onError: a!save( local!errorMessage, "Error Exporting File to Excel" ) ), a!save( local!staussave, true ), } ) )
And this is the stored procedute code:
executestoredprocedure( dataSourceName: "jdbc/Appian", procedureName: "deleteOppExcelData" ),
Discussion posts and replies are publicly visible
Why not just start a process and do anything you like? a!startProcess()
because it is the same process as the other case earlier, In the process I can generate the file and everything but does not have an option to download it after. Process is not returning generated file ID to be used in download link.
Did you enable chaining in the process model? If you chain up to the node which creates the file, this value will be available inside onSucess.
I am using a!startProcessLink dont' see OnSucess parameted for this function. Is it something else that have to be used in order to be able to get onSucess ?
Ok that helped alot I have changed to use buttonWidget where I can use startProcess and now it works.
Thank you !
a!startProcessLink() is a different function than a!startProcess(). You would want to use a!startProcess() in this case, where your intention is for the user to stay on their current form and eventually be given a downloadable link to a generated file.