cancel
Showing results for 
Search instead for 
Did you mean: 
bcasey
Nintex Newbie

Workflow Error Handling for 'Set Variable' Action

Jump to solution

I have a workflow that collects a user ID from a people picker field.  This is pulled from the SharePoint user cache that comes ultimately from Active Directory. 

Part of the workflow is to take that user ID and pull the associated Display Name of the user to use in email notifications and to display in the list.  Often, people are picking a test account or admin account or service account from the people picker (because many of our people have multiple accounts in AD), and then the WF cannot find the display name and breaks.

Is there a way to have the WF check whether the account is an Admin or Test account (incorrect) or an actual person account (correct), and then perform a different action based on the result? 

0 Kudos
Reply
5 Replies
shrinivasnaik
Nintex Newbie

Re: Workflow Error Handling for 'Set Variable' Action

Jump to solution

Hi Casey,

You could use "Query User Profile" action and select "First Name" and "Last Name" for the properties to retrieve. This Query User Profile action does have an error handling section and you could set a variable to check if it has gone into an error and take corresponding action.

Set Variable action does not have a built in error handling mechanism.

Regards,

Shrini

Reply
bcasey
Nintex Newbie

Re: Workflow Error Handling for 'Set Variable' Action

Jump to solution

Thanks, Shrini.  I'll look into query user profile action. 

Can you provide any more details about how to setup separate actions based on the error handling function?

I assume I create a variable and store the error text or error occurrence in it.  How do I then split off actions one way or another based on the result?

0 Kudos
Reply
shrinivasnaik
Nintex Newbie

Re: Workflow Error Handling for 'Set Variable' Action

Jump to solution

Hi Casey,

There are not many actions in Nintex that provides you with custom error handling mechanism , Query user profile action is one of the few which has inbuilt Error handling mechanism, so that the workflow does not error out if there was an error in querying values from UPS.

With regards to your second part of question you are correct you would need to store the error occurrence (boolean variable and may be error text .. if you want to be notified about it or log it in another variable) have an "Run If" action just after the Query User profile action. RunIf action will check if the error variable is true then do a set of actions (like notify/end the workflow etc), if the variable is false ( positive condition) then the actions inside "Run If" action wont be used.

Regards,

Shrini

Please mark as answered if it solves your query, would be useful for other folks who have similar query.

Reply
Highlighted
bcasey
Nintex Newbie

Re: Workflow Error Handling for 'Set Variable' Action

Jump to solution

Shrini,

This works perfectly!  Thanks for the help. 

There's also an article here that discusses the same thing:  https://community.nintex.com/community/build-your-own/blog/2017/03/02/error-handling-in-nintex-workf...

Reply
shrinivasnaik
Nintex Newbie

Re: Workflow Error Handling for 'Set Variable' Action

Jump to solution

Hi Casey

glad it worked for you

refards

Shrini

0 Kudos
Reply