Solved

Validation messages still shows even the panel is hidden.

  • 22 February 2017
  • 6 replies
  • 126 views

Badge +9

Hi All,

 

Business Requirement:
 

I have a 3 stage workflow that goes to employee, manager, dept. head and then HR.
Employee fills the form and goes to his manager.

Manager verifies the employee’s travel info and form is read only for him except approved date and comments. Both the mandatory fields i.e. approved date and comments for manager.

I have put Manager’s approved date and comments a panel and its hidden when employee views the form.

Challenge:

When an employee submits the form, Manager’s Approved date and comments are shown as required fields although Manager’s panel is hidden.

Q: How could I fix this behavior? I don’t want to show Manager’s approval date and comment when employee submits the form.   

Thanks in advance.

icon

Best answer by shrinivasnaik 22 February 2017, 11:43

View original

6 replies

Badge +8

Hi Sandy,

Just so that I understand it correctly are both of these fields been made mandatory at SharePoint level? If yes then you would not be able to override this even if you hide these fields in the Panel as SharePoint would expect a value when you add a new record

You could remove the mandatory setting at SP level and validate this at Nintex form level.

Regards,

Shrini

Badge +8

Hi Sandy S‌,

Best practice is while creating a Site Column/List Column, ensure the field is NOT marked as mandatory.
Mandatory fields need to be taken care on the Nintex form level using the rules on the field controls.

Userlevel 5
Badge +13

Hey Sandy! Are you currently hiding the controls with a panel? I'm guessing, if so, that your expression looks something like this when you open the properties of your panel and go to Appearance > Visible = Expression:

fn-IsMemberOfGroup(Managers)

Control settings of panel configured to hide if user is not a member of group "managers"

Or are you hiding it with a rule on the panel in the right pane with something like this:

Rule configured to hide based on signed in user

Depending on which one you're using, and if you'd like to remain with that and stay consistent, I'll show both ways of accomplishing this! You do need to make sure that the columns are not required in SharePoint. We'll take care of that here in Nintex.

In the control settings, there is a "Validation" part where you can put in a rule for validating the control. There is also a way to do it in the rules pane. You can make it dependent on who is signed in, and whether or not they're in a particular group. Keep in mind, however, if your "Manager" user would ever make a submission as an "Employee" and you're using group based logic, you could "mess up" your flow.

So, do you want to accomplish "if user is in group manager, this field is required" or "if user is in group manager AND is not the original requestor (I'm assuming you have a requestor field)"?

Badge +9

Hi Shrinivas Naik and Chaitra B C

The Manager column is indeed a SharePoint column. Whenever employee fills in the form, they keep on get Manager as required filled in as shown:

 

I have not tried that option. Let me check if it works for me.

Thanks everyone!

Badge +9

the screenshot: 

Userlevel 5
Badge +13

Hey Sandy,

Can you post a screenshot of how you're hiding the panel? That would help me give you a more direct instruction for how to make it "conditionally" required (only required under certain circumstances, like if the person editing is the manager). Also, make sure that you make the columns (approved date for manager and comments for manager) NOT required in the SharePoint list settings.

Reply