Validate Data in another list before Submission


Badge +5

Hi,

In a Nintex form is it possible to validate data in another list before submission? I have two lists as below:

Master:

IDStageStage Complete?
1First
2Second

Delays List:

DelayBarrierBarrier Remove?StageMasterId
AB1YesFirst1
AB2NoFirst1

What I want to do: on the Master from if user hits "Stage Completed?" before submission, the form being validated and if there's any related Delay with "Barrier Removed?=No" it doesn't save and shows an error message?

I know Lookup can be used for validation on another list, but in my case I need to do a query on  Stage, Barrier Removed? and Master Id.

Any help would be appreciated!


6 replies

Userlevel 6
Badge +16

Unfortunately , the lookup function only alows 1 parameter to search.

You can write some javascript to read your item with SharePoint REST service.

There are many samples here.

Userlevel 2
Badge +11

If Stage is not a lookup/choice field (text column connected to a choice form control) you could add a calculated column in the Delays list for <ID>_<Stage> and use this as a filter; it can be made hidden in the list's advanced setting to manage content types.

Badge +5

Thanks Jean,

Th issue with Lookup is it just return One Item. I need to do a query on all related Barrier to see if the're removed.

Badge +5

Thanks Fernando,

I'm doing some search about this!

Badge +5

Thanks Fernando,

I'm doing some search about this!

Userlevel 5
Badge +14
I need to do a query on  Stage, Barrier Removed? and Master Id.

what's the difference between 'Stage' and 'Master ID'?

it seems from your description they both identify the same master record. so you need not to filter by both.

so you're left to filter just by two fields, by (eg) Master ID and BarrierRemoved.

having just two fields to filter by you could handle it as follows

InArray(lookup('DetailList','MasterID',CurrentMasterIDInMasterFormNamedControl,'BarrierRemoved',true),'No')

so, if for given MasterID there is at least one item with value NO in field BarrierRemoved, the formula evaluates to true

Reply