Weird issue with 'Set Variable' action.


Badge +6

Hi Nintex Team,

 

I am facing weird issue in Nintex 2013 Workflow. Sometime Set Variable action set value correctly and sometime not which makes my application break for no reason.

 

I am trying to set text variable (strUserAsText) from people picker column UserAndApproverInvolvedSoFar with Set Variable action. Here, I need the Login Name so I can set it in Set Permissions action, but it is getting set as:

44;#Desai Chintan

While I need in format

i:0#.w|klext-desai

 

Alternative 1: Then I deleted below Set Variable and created replica, output is same – Error.

Alternative 2: Then I tried getting Email Address from UserAndApproverInvolvedSoFar people picker, output is same – Error (sometime it set email address, sometime it set as 44;#Desai Chintan).

 

I am going crazy, as what is going wrong. I doubts its because of Switch statement or some corruption in Set Variable. 

205864_pastedImage_1.png


3 replies

Badge +9

Hi Chintan Desai‌,

I guess 'UserAndApproverInvolvedSoFar' people picker field is a lookup column.

1. Create 'pplApprover' type Person or Group' and set return type as 'Lookup Value(as text)'

205861_pastedImage_1.png

2. To get Login Name, Create 'txtApprover' and set return type as login name from 'pplApprover'.

205868_pastedImage_2.png

In the 'Set Item Permission' action i hope you can use 'pplApprover' directly. No need for Login Name.

Thanks,

Lakshmi C

Badge +6

Hi Lakshmi,

Sorry for the delay in reply. 

I am not getting Lookup Values option in dropdown as what you have pointed out.

However, I tried almost your approach to assign UserAndApproverInvolvedSoFar to a Collection and then ForEach to assign it to strUserAsText (using Set Variable). One day it worked fine. But the next day its the same strUserAsText set as 44;#Desai Chintan.

BTW. Is this because my environment do not have latest updates for Nintex WF. My current version  Nintex Workflow 2013 (3.1.5.0)

Thanks,

Chintan

Userlevel 5
Badge +14

Haven't you tried to use in set permission action directly PP list field?

if a value is returned from one action it might likely be accepted by the other within the same context

Reply