Hi
I have an app where users submit information and the app creates a PDF for the last record with that information.
This is the code for the button that runs the mentioned above:
SubmitForm(Form1);
PenInput.Run( "Here I have HTML code to concatenate text with gally items", i.e:: &Concat(Gallery2.AllItems, ID)
"and I have a PenInput to get a digital signature <img width='120px' src=" &JSON(PenInput1.Image, JSONFormat.IgnoreBinaryData) & ">
, "Ded"&Last(BD).Modified);
Reset(PenInput1);
NewForm(Form1)
The PenInput.Run is a flow that uses HTML and concatenate information from a Gallery to generate the PDF but I'm having issues with the pdf generated because is not using the information from the last record because the flow runs before the gallery updates, so the PDF is being generated with the information from the previous record submitted.
I want to have all in the same button if it's possible. Is there a way to add a delay to the code between the SubmitForm and the flow that creates the PDF to give time to the gallery to update with the last record information? Or update the gallery immediately before running the flow to create the pdf?
Right now the only solution that worked in all the testing I've made is to have two buttons and run the submit separately from the flow but it's not he solution that I need.
Any idea is welcome.Thanks for your help.