cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Using Custom Validation

Jump to solution

Hi

I am trying to use Validation in the control , which I have not used very often.  Most of our fields are required columns set at the sharepoint list level.

Apologies if this has been asked before, but I just need some guidance please!

I would like the validation to be if the use selects a drop down

A

i.e.

Then the following text box must be completed.

If the drop down is

B

i.e

The text box can be ignored

I presume I can use this function?

Is anyone able to help?

Thanks

Karen

Tags (2)
Reply
36 Replies
Highlighted
Nintex Newbie

Re: Using Custom Validation

Jump to solution

Try using contains on the Compare operator

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

I have used Contains before

Contains Formula

This makes sense to use this, thank you but I am a little confused how to implement this.  Are you able assist?

On the "Compare to" it is a drop down list, I cannot see how to build a formula

Would this be in the "Customer Validation" function instead?

Thank you!

Karen

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

I tried the following

But this did not seem to work?  To test I deliberately left the field empty and tried to submit to submit the form, it submitted successfully instead of prompting me with an error message to say it was empty?

I will work on the formula as it looked slightly different to the formula builder I used previously so It might be the formula that is causing the issue.

Any ideas would be appreciated.

Thanks

Karen

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

As an update I decided to use a Validation Rule instead of custom validation which I felt may have been a better route.

I was hoping that the validation rule will stop a user from completing the form without filling in this box.  I have used the following -

However when I try this out and deliberately leave the box blank it does not prompt me to say that the box is blank and needs to be completed.

Is there something that I am doing wrong?  It may conflicting with another rule which is also on the text box which is working correctly (and I do not wish to change)

If Anyone can assist as to where I need to make a change that would be helpful

Just to confirm what is required -

Where the named control regulation status is Other or unregulated status the specify detail text box must be filled out

Please note that I have not put this as a SharePoint mandatory column.

Karen

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

It seems that this question has been asked before

Validation for Single Line Textbox

Karen

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

I have tried to recreate a brand new validation rule and tried this on another text field, just to find out if the validation was not working correctly.

I used

isNullOrEmpty({Self})

This did not work, so I am wondering if there is a bug? I have the following version of nintex forms

Nintex
Forms 2010 ( 1.7.0.0 )

I note if I use a rule to hide a control this works correctly though.

Karen

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

I have tried rebuilding the rule from scratch and tried this on another control to see if this would work elsewhere.

It seems that if I use the following formula in a rule and choice "formatting" / "Hide")

contains(Regulation Status,"Other") && IsNullOrEmpty({Self})

The control is hidden when the Regulation Status is "Other"

Drop Down list is "Other"

But If I change the rule to "validation", then the rule does not work and validation is ignored i.e. if the above box is empty and Other is selected in the drop down, the field is not prompted to be required.

I am really struggling as to why the same formula will not take validation?  If anyone has any ideas I would be really appreciated.

Karen

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

I have been trying to resolve this via SharePoint Validation Settings

It almost works but not quite

Basic rule - =IF(ISBLANK([Specify Detail]),TRUE,FALSE)

I have not added in the drop down as yet, just wanted to see if this worked better although I think the rule is the wrong way around!  Highlighting the box when it should only highlight when blank.

Will update if I can resolve it by using validation settings.

Thanks

Karen

Reply
Highlighted
Not applicable

Re: Using Custom Validation

Jump to solution

Hi

I have not been able to resolve this yet and noted someone else had the same issue -

Validation for Single Line Textbox

I have however been able to use a validation in the control settings, but this is only for stopping anything but alpha characters in the box

it does not account for blank

Anyway this is the only way of putting a red line around the box!

Karen

Reply