Hi all, I know there's multiple ways to do this but I'm keen to try to maintain consistency.
I have a form linked to two datasources - database 1 uses lookup from database 2. It uses submit () written into onSubmit (submitting within sharepoint) - this submits most of the information to the database 1. I've made one field required and if left empty the following error pops up (this is out of the box) upon pressing submit.
I have another set of fields (made visible when I toggle add New) and the data is collected into database 2 and then patched into database 1. Essentially an Add entry if the field doesn't already exist in database 2.
I want to make the fields that appear on Add New to also be mandatory and keep the consistency of the out of the box error.
I couldn't do this by just making this required on both side so have had to resorted to using an if() function to check if the field is blank and stop the collect / patch as well as if() function to stop the submit of the form. Now I just need to have the error text pop up and field border change colour upon submitting if the field is blank which is where I'm having difficulty.
I tried setting the visibility as a variable (bVisible) and then having the text visible when bVisible = true. Then I tried to use UpdateContext to change the bVisible from false to true conditionally which works - however I can't insert this into the onsubmit property of the SharePointintegration.
Any advice is appreciated and if there's an easier way to do this I am all ears!

Report
All responses (
Answers (