I have two forms:
Form3 is the completion of a 3 sheet survey which loads to the CDS
Form4 are attachments which load to sharepoint
When you click submit without attaching any documents to Form4, you get an error but the form still submits. I'd like for the form to not submit unless you have attached documents. I suspect I need to update the code in Form3 but I wasn't sure how to move forward.
Submit_Button:
On Select - Set(varSubmitMode,"submit");SubmitForm(Form3); SubmitForm(Form4)
Form4
Required = true
Form3
On Select:
If(
varSubmitMode = "submit",
Patch(
PS_PAF_BidPros,
Form3.LastSubmit,
{StatusSQL: "Submitted"}
));
Navigate(Success_Screen,ScreenTransition.Fade)
Solved! Go to Solution.
Hi @TesDA
You could have a variable "HasAttachment" that you set to true once the attachment is uploaded, the on the OnSelect for the button, you can include:
If(HasAttachment = true,SubmitForm(Form4),"")
This formula will check the variable value, if True then the form4 is going to be submitted, otherwise you can include an error message and the form won't be submitted.
Best Regards,
--
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @TesDA
You could have a variable "HasAttachment" that you set to true once the attachment is uploaded, the on the OnSelect for the button, you can include:
If(HasAttachment = true,SubmitForm(Form4),"")
This formula will check the variable value, if True then the form4 is going to be submitted, otherwise you can include an error message and the form won't be submitted.
Best Regards,
--
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @TesDA ,
Do you only want to submit the form that has attached attachments?
If so, I suggest you add a if statement in your submit formula.
Firstly, please check the attachments control names in form3 and form4.
Then you could use this formula to justify whether there's attachments attached in the fom:
IsEmpty(DataCardValue21.Attachments)
// DataCardValue21 is my attachments control name in my form, you just need to replace with the names in form3 and form4.
The formula to submit:
If(!IsEmpty(DataCardValue21form3.Attachments),SubmitForm(Form3));
If(!IsEmpty(DataCardValue21form4.Attachments),SubmitForm(Form4))
//please replace DataCardValue21form3 with attchments control name in form3
please replace DataCardValue21form4 with attchments control name in form4
Best regards,
User | Count |
---|---|
175 | |
111 | |
86 | |
44 | |
42 |
User | Count |
---|---|
228 | |
116 | |
115 | |
72 | |
67 |