Hi, I am trying to build an app that allows a user to input text into 7 text boxes, then use that information to populate an email and send it to a shared inbox when a "Submit" button is clicked. I have set up my flow and it is working correctly. My button has the following code on the OnSelect.
SendEmailCoverRequests.Run(
TextInput_Name.Text,
TextInput_Date.Text,
TextInput_Reason.Text,
TextInput_Details.Text,
TextInput_Where.Text,
If(
IsBlank(TextInput_LessenCover),
"",
TextInput_LessenCover.Text
),
If(
IsBlank(TextInput_Duties),
"",
TextInput_Duties.Text
)
);
Notify("Your request has been sent.");
Reset(TextInput_Name);
Reset(TextInput_Date);
Reset(TextInput_Reason);
Reset(TextInput_Details);
Reset(TextInput_Where);
Reset(TextInput_LessenCover);
Reset(TextInput_Duties);
The intention is to have the first 5 text boxes be required and the last two be optional. This works fine when all text boxes are filled and it works when one or more of the optional text boxes are blank. However when I use the Reset() function to reset the optional fields (TextInput_LessenCover and TextInput_Duties in this case), and the optional fields are left blank, the flow is unable to send the emails as it is sending a blank value for the 6th and 7th text boxes instead of "".
Is there another function I can use instead of Reset() to stop my app only working once before needing to be reloaded?