SharePoint Form Validation

  • 18 January 2022
  • 1 reply
  • 128 views

Hi Everyone, I have a scenario where I am trying to create a Nintex form for O365 SharePoint List. There is a input field "Account" on my form (connected to List 1). The form can submit only if the value entered in "Account" field either doesn't exist in List 2 "Account" column or does exist in List 2 "Account" column but "Valid" is Yes. If the Account field does contain the value and "Valid" is set to No it should not submit and show an error to user that form cannot be submitted. List 2 is setup in a way it has 2 columns - Account (Single line of text) and Valid (Yes/No) fields. Is this feasible with Nintex forms? Please help I am new with Nintex.


1 reply

Userlevel 2

Hi Sujith Rahul


I assume you already have "Account" as Text/Choice field on the form(list1) and


"Account" as text field and "Valid" as yes/no on "list2"


You can follow steps:


1) Create 2 variables say "varAccount" and "varValid" using "lookup" function on the form


(lookup("list2", "Account", Account, "Account") , (lookup("list2", "Account", Account, "Valid")



  • This gives you the 'valid' value 'true/false' based on account field on the list2

  • And account as account value if it exists and blank if it doesn't exist


2) Create two text fields, "Account Lookup" and "Valid Lookup" on the form 


3) Create a form rule if "Account" is filled then "Account Lookup" is equal to "varAccount" and "Valid Lookup" is equal to "varValid"


4) Create submit rule if "Account Lookup" is filled OR "validLookup" is not equal to true then show validation error "form can't be submitted......etc."


 


Let me know if any issue, please mark it as "solved" if it works


Kind Regards,
Ashish


 


I assume this will work, if you find issues let me know


Kind regards,
Ashish


 


 


 

Reply