Vadim Tabakman

With the release of build 1.2 of Nintex Forms, we have the introduction of the new Rules Engine.

It adds an extra level of control to your forms that you didn't have before. Well, you sort of did, using Javascript, but honestly, who wants to write a bunch of JS code when you can everything in a simple user interface.

This post will be about how to utilize the new Rules Engine. It'll be a simple example that will hopefully get you started with creating more complex rules and making your forms bigger and better.

Scenario

We have a custom list with a Text field  (title) and a Choice field (country).

The Country can be one of the following : United States, Australia, or Germany.

What we would like to do, is show detailed information on the form, based on the selection of the choice field.

Solution

To keep this simple, we'll put the detailed information into a Panel on the form.

Base Form

The bottom part of the form seen above has a pale yellow Panel control.  Inside it, it has an Image and Rich Text control.

For this example, we will have just this panel with this information regarding Australia. 

What we want to do to, is making this panel visible only if the user selects "Australia" in the choice field.  To do this, we highlight the panel and in the ribbon, click the Add Rule Button:

Add Rule

You'll see a new control panel appear called "Rules", and here you'll be able to click the Add New Rule button to create a new rule.

Add New Rule

We'll call the rule "Details Panel Visibility".

For the Condition, we can click on the little button to the right which brings up the Formula Builder.  We insert the "Country" field and we do a "not equals to" which is "!=" and the word "Australia".  For the formatting, we check the box "Hide".

What this means, is that we want to change the visibility of this control to "Hidden", if the Country field is not equal to Australia.

In another way, only show the Panel with Country equals Australia.

New Rule Configuration

We now publish the form, and in our custom list, create a new item:

Fill In Form

Conclusion

This is a very simple rule, and I'm sure in a business scenario, users will define much more complex rules.  But this should give you an idea of how much more powerful Nintex Forms has become with the latest release of version 1.2.

If you haven't upgraded to v1.2, you should really look into doing this. 

Important Files to Download 

Posted by Vadim Tabakman Sunday, November 25, 2012 8:58:00 AM Categories: Nintex Nintex Forms Rules
Copyright Vadim Tabakman
Rate this Content 0 Votes

Comments

Monday, January 28, 2013 6:05:59 PM
Euan

re: Nintex Forms - Simple Rule

I also found out its like full JavaScript syntax so its 'x == y' not 'x = y' which a business user is not going to be familiar with.

Monday, January 28, 2013 7:13:12 PM

re: Nintex Forms - Simple Rule

Hi Euan,

Good point.  Thanks for pointing that out :)

cheers,

Vadim

Thursday, March 13, 2014 7:34:20 AM
Trish

re: Nintex Forms - Simple Rule

Hi Vadim,

Nice simple rule! How can I make the hidden field mandatory when no more hidden?

I found a custom validation js, but I can't make it work. Any help would be appreciated!

function MyReqVal(val,args){
args.IsValid = (NWF$(val).parents('.nf-filler-control')[0].style.display == "none") || (ValidatorTrim(ValidatorGetValue(val.controltovalidate)) != "");
};

Thanks

Trish

Thursday, March 13, 2014 7:42:04 AM
Trish

re: Nintex Forms - Simple Rule

Sorry, more precisions: Nintex forms 2010, Version: 1.4.0.0!

Thanks

Trish

Thursday, March 13, 2014 11:50:26 AM

re: Nintex Forms - Simple Rule

Hi Trish,

Here's a form I put together that may do it : http://www.vadimtabakman.com/Data/Sites/1/vtdownloads/blog/MandatoryIfVisible/CheckBoxOrIsVisibleValidationForm.zip

I hope that helps.

cheers,

Vadim

Friday, March 28, 2014 9:20:04 AM
ngr
Gravatar

re: Nintex Forms - Simple Rule

nintex form 2013 . Current User != "alice" -->Disable . rule isnt running because everybody can use that rule or x == y too. how did you do ?

Friday, March 28, 2014 11:18:27 PM

re: Nintex Forms - Simple Rule

Hi,

I don't understand what you mean.

Maybe use a Calculated Value control and insert the Current User so you can see what the value is.

Then you can see if it's "Alice" or "Alice Smith" or "domain\useralice" etc.

cheers,

Vadim

Monday, March 31, 2014 3:07:22 AM
ngr
Gravatar

re: Nintex Forms - Simple Rule

Sorry, ı tried that..

So, I wrote a rule for single line textbox. The rule is: CurrentUser != "alice.ngr" and Ichacked Disable. Namely ı wantto write an IF statement.. 

 

Monday, March 31, 2014 6:14:15 AM
ngr
Gravatar

re: Nintex Forms - Simple Rule

OK, solved 

I think, '==' sign  can 't perceive compareing about WF variables and strings. So if statement is a big problem at that time. 

But tools can be disabled on different way . 

Rule: Contains(CurrentUser, "alice.ngr") and chack Disable. You can controll your form.

After that;  Only user alice.ngr can't enable that tool.

 

 

Tuesday, April 1, 2014 5:29:15 AM
Rainer
Gravatar

re: Nintex Forms - Simple Rule

Hi Vadim,

the rule will be executed by form loading but while changing the value (Country) nothing happens. I thougt that it works in runtime...

Could it be that I forgot something like change the form settings or anything? 

 

Rainer

Tuesday, April 1, 2014 2:18:47 PM

re: Nintex Forms - Simple Rule

Hi Rainer,

add a Calculated Value control and configure it, to point to your Country control.

Then preview you form.  When you do your selection, the internal value will be displayed in the Calculated Value control.  This should show you if you're Rule needs to be updated with a slightly different comparison.

cheers,

Vadim

Monday, April 21, 2014 6:06:54 AM
Vatsal Thakker
Gravatar

re: Nintex Forms - Simple Rule

Hello,

Nice bolg Vadim Tabakman,

I have below question.

Suppose there is a single line texbox and it's name is XYZ.

Now there is one calculated control and I write formula for XYZ textbox.

Formula is: If(XYZ == "", "Not Recorded", "Recorded")

Now I entered value as 12 in XYZ then calculated control shows Recorded and If I didnot enter any value then it was display Not Recorded. Now I entered value as 0 in XYZ then calculated control displayed Not Recorded. But if user entered value as 0 then I want to display Recorded. Is there any solution for it?

 

Thanking You,

Vatsal Thakker

 

Monday, April 21, 2014 11:55:41 PM

re: Nintex Forms - Simple Rule

Hi Vatsai,

You need to use the Or inline function.

It looks like this : If(or(XYZ == '',XYZ=='0'), 'Not Recorded', 'Recorded')

cheers,

Vadim

Tuesday, April 22, 2014 12:46:56 AM
Vatsal Thakker
Gravatar

re: Nintex Forms - Simple Rule

Hello Vadim,

Thank you very much for your reply. But my question is I want to display Not Recorded in calculated control if I entered value as 0 in textbox.

Thanks,

Vatsal

Tuesday, April 22, 2014 3:05:11 AM
Vatsal Thakker
Gravatar

re: Nintex Forms - Simple Rule

 

Hello Vadim,

Sorry I want to display Recorded in calculated control if I entered value as 0 in textbox.

Thanks,

Vatsal

Tuesday, April 22, 2014 8:00:17 AM

re: Nintex Forms - Simple Rule

Hi Vatsal,

If(XYZ=='0','Not Recorded','Recorded')

cheers,

Vadim

Tuesday, June 10, 2014 5:27:15 AM

re: Nintex Forms - Simple Rule

Hi there

I have a feedback form, when customers fill in the feedback form an item gets created in a list, when I view the feedback form or item in the list the "Personal details" Tab is not working, so basically that tab is disable its not showing any information under that it

I have only one rule to hide the tab/panel if its not equal to that

Tuesday, September 23, 2014 10:38:20 AM
Michael
Gravatar

re: Nintex Forms - Simple Rule

Vadim

I'm attempting to hide a control based on a check box (which i've seen explained before) and am having issues. I've tried:

=not(checkbox)

=checkbox != 0 ; 1 ; "Yes" ; "No" ; "false" ; false ; and some other options... 

Any idea what I'm doing wrong here or how what the outputs of a checkbox are? thanks

Tuesday, September 23, 2014 1:02:59 PM
Michael
Gravatar

re: Nintex Forms - Simple Rule

Solved the problem. The issue here was that I was basing the rules on 1 site column "Vendor Involved?" and was applying it to a field "Vendor Involved"

When the form tool I was using pulled in the list's site columns, it pulled the two columns I needed from the same path in SharePoint which was the "Vendor Involved" column. It ignored the ? in the column name and therefore was attempting to apply the condition to the incorrect field.

I created another column titled "Vendor Involved YN" and replaced the other column.

Monday, October 20, 2014 8:25:46 AM
n.wagner
Gravatar

re: Nintex Forms - Simple Rule

Hi Vadim,

regarding the post below - could you please specifiy how I have to change the methodes/Properties to get this "old" function running ? I think we have syntactical changes with new forms-versions and there the "old"-one ist not running anymore. Please adivce :-)

This is my old function :

function CheckRequiredField(val,args){
args.IsValid = (NWF$(val).parents('.nf-filler-control')[0].style.display == "none") || (ValidatorTrim(ValidatorGetValue(val.controltovalidate)) != "");
};

 

Thanks

Norbert

Hi Trish,

Here's a form I put together that may do it : http://www.vadimtabakman.com/Data/Sites/1/vtdownloads/blog/MandatoryIfVisible/CheckBoxOrIsVisibleValidationForm.zip

I hope that helps.

cheers,

Vadim

Friday, April 1, 2016 8:45:44 PM
Gaye Shu
Gravatar

re: Nintex Forms - Simple Rule

Creative blog post . I was fascinated by the analysis ! Does anyone know where my company could grab a blank DA 268 version to complete ?

Friday, April 1, 2016 9:03:13 PM

re: Nintex Forms - Simple Rule

Hi Gaye,

are you looking for a DA 268 Nintex Form design?

Vadim

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register

Statistics

  • Entries (290)
  • Comments (1777)

Categories