Skip to main content
Nintex Community Menu Bar
Solved

Enable field using Expression in Nintex Form

  • March 17, 2025
  • 4 replies
  • 34 views
  • Translate

Forum|alt.badge.img+3

Hello,

Tying to setup an Expression in Choice control when current user is equals to the Name on the Approver field. However for some reason it does not work. am I doing it incorrectly? 

Then Approver field is (First name and Last name, i.e John Doe)

 

Hoping for your response and much appreciated.

 

 

Thank you,

Antonio

Best answer by SimonMuntz

Hi ​@aorellano,

I see a couple of issues here.

Firstly, the current user common reference returns a claims-based identity string (i:0#.w|domain\user), so it will never equal your approver control.

Secondly, The if function (fn-if) takes three parameters, and you only have one.
You should replace this with the equals inline function fn-equals(first parameter, second parameter), or, as you are dealing with a claims identity, you may want to use contains (fn-Contains(string value1, string value2)).
 

View original
Did this topic help you find an answer to your question?

4 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • 2461 replies
  • Answer
  • March 17, 2025

Hi ​@aorellano,

I see a couple of issues here.

Firstly, the current user common reference returns a claims-based identity string (i:0#.w|domain\user), so it will never equal your approver control.

Secondly, The if function (fn-if) takes three parameters, and you only have one.
You should replace this with the equals inline function fn-equals(first parameter, second parameter), or, as you are dealing with a claims identity, you may want to use contains (fn-Contains(string value1, string value2)).
 

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 11 replies
  • March 19, 2025

Hi Simon,

Thank you for your response, much appreciated. I’ll try the Contains function and see if that works. I thought the “Display Name” parameter is the actual First name and Last Name of current user. How about if combine the UserProfileLookup where “Preferred Name” show the FirstName and Lastname of the account. can this works?

 

Thank you.

Antonio

Translate

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • 2461 replies
  • March 19, 2025

Hi ​@aorellano,

Using the userProfileLookup could help you match the approver with the current user.
I also suggest you use a formatting rule rather than configure the formula in the control.
When using a function in the control configuration, you cannot reference other controls, but you can when using a rule.

Translate

Forum|alt.badge.img+3
  • Author
  • Rookie
  • 11 replies
  • March 24, 2025

Hi Simon,

I used the formatting rule and that seems to work. It disabled it when the value in the other field is not equals to the current user.

 

Thanks again for your help, much appreciated.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings