Solved

How to hide a panel from user if it's the same as Name Field

  • 20 July 2015
  • 4 replies
  • 249 views

Userlevel 2
Badge +5

Hi,

 

We have a form with a strange request - it can be completed on behalf of a user, but a user cannot complete it themselves. So, I was trying to disable sections of the form if Current User == NamedField.

 

That formula doesn't work, so if there is another way to do it, please let me know happy.png

 

We're using Nintex forms/workflow for 365 and SharePoint Online.

icon

Best answer by kmcollins 21 July 2015, 02:02

View original

4 replies

Badge +9

I'm scratching my head trying to understand your requirement...

You stated Current User can't be the "User". So the current user is always filling to the form for another users and putting their name in a "User" people picker.

So you want to hide sections of the form is the Current User put them self in as the "User"?

If that is correct you should be able to use a Formatting Rule on a panel with the formula equals(CurrentUser,User)

Userlevel 2
Badge +5

Hi,

It's an odd one I know. It's for our termination check list. So there is:

* Current User who completes the form

* Employee Name about whom the form is completed.

So, what's supposed to happen, when a person is leaving, they sit down and go through the check list together. What I've been asked to protect against is someone completing the form for themselves. To make it worse, the Employee Name field is a lookup field.

I've got it working if you use a people picker, however, what I have already suits what we are trying to achieve. If I could get this working. Is it possible to populate a people-picker from a textbox?

Badge +9


quick though - not sure if possible in Nintex Forms for Office 365 as it still has quite a bit of functionality missing compared to on-prem.

I would create hidden Calculated Field not linked to a column, the formula for this would be a lookup on the "Current User" returning their Display Name plain text

You can then do your formatting rule between the Calculated Column and the Employee Selection.

If the employee selection is returning an ID rather than employee name text to compare against, you may once again need to use a calculated column or JavaScript snippet to copy the plain test name into another field to compare against.

Userlevel 2
Badge +5

Hi,

I worked this out - thanks to your tip about the calculated field. I set one up to show what the dropdown list was storing and it showed for example 6#;Tom Smith. So I changed the rule so instead of it being EmployeeSelection == CurrentUser, it is Contains(EmployeeSelection, CurrentUser).

This seems to be working, so thanks for your help

Reply