So, I have a form where the students can apply for classes under a specific teacher.
This screen has a text box with a text box where the student can type anything and then ticks the 'i agree to the terms and conditions' checkbox and then clicks on the submit button.
The submit button will check that the checkbox is ticked, update a sharepoint list with the required data, trigger email to the teacher keeping the student in cc and then the button itself will disappear.
OnSelect property of the button has this code:
If(Checkbox1.Value = true,
Office365Outlook.SendEmail(
"xxxxxxx@xxxxxx.com",
"Applying for tuition",
"You have a pending access request.
Requested by: " & currentUser.FullName
& "
Requesting tuition under you for subject"
& Upper(varComp)
,{Cc:currentUser.Email,Importance:"High"}
)
&&
Notify(
"The teacher has been notified that you have applied for tuition. Kindly wait for a response from them.",
NotificationType.Information
)
&&
Set(varVisible1, "666")
&&<--------code given below in italics goes here------->
,
Notify("Please accept the terms and conditions before clicking on submit",NotificationType.Error)
)
The above code works perfectly.
But when I append the below code, the patch functions throws an error.
Patch
(
'Teaching',
Defaults('Teaching'),
{
Tuition_Status: {Value: "Applied"}
}
)
The patch functions works perfectly fine as a standalone function.
Any suggestions?
PS: The variables set here are for disabling the button. Ignore that part
Solved! Go to Solution.
Hi @AD1990
Just noticed and we can change the order a bit.
If(Checkbox1.Value,
Patch Function;
Send Email;
Notify function;
Set Variable;
,
Notify("Please accept the terms and conditions before clicking on submit",NotificationType.Error)
)
Please let me know if any help with this.
Thanks,
Stalin - Learn To Illuminate
HI @AD1990
Here are the Overall Steps;
If(Checkbox1.Value,
Send Email;
Notify;
Set Variable;
Patch Function
,
Notify("Please accept the terms and conditions before clicking on submit",NotificationType.Error)
)
Thanks,
Stalin - Learn To Illuminate
Hi @AD1990
Just noticed and we can change the order a bit.
If(Checkbox1.Value,
Patch Function;
Send Email;
Notify function;
Set Variable;
,
Notify("Please accept the terms and conditions before clicking on submit",NotificationType.Error)
)
Please let me know if any help with this.
Thanks,
Stalin - Learn To Illuminate
Thanks. This was the perfect solution.
User | Count |
---|---|
260 | |
110 | |
97 | |
56 | |
40 |