Skip to main content
Nintex Community Menu Bar

Validate Data in another list before Submission

  • May 14, 2018
  • 6 replies
  • 13 views

Forum|alt.badge.img+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

Forum|alt.badge.img+16
  • May 14, 2018

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.


Forum|alt.badge.img+11
  • Nintex Partner
  • May 15, 2018

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.


Forum|alt.badge.img+5
  • Author
  • May 15, 2018

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.


Forum|alt.badge.img+5
  • Author
  • May 15, 2018

Thanks Fernando,

I'm doing some search about this!


Forum|alt.badge.img+5
  • Author
  • May 15, 2018

Thanks Fernando,

I'm doing some search about this!


Forum|alt.badge.img+14
  • Scholar
  • May 15, 2018
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