You are viewing limited content. For full access, please sign in.

Question

Question

Assign User Task From a Name in a Text box

asked on September 10, 2024

I am building a form that tracks AD User Changes.  The For would be filled out by "IT" staff for the End user to approve after the change was made. With that being said the User Task could be assigned to anyone. I am tying to figure out the best way to accomplish this. 

I would like to assign the task based on the name in the User Text Box as seen in the Photo but that seems not to work as i expected and it errors out.

 

Chris 

2024-09-10_13-25-19.png
0 0

Answer

SELECTED ANSWER
replied on September 10, 2024

The trick to getting that to work is making sure the value matches the actual account not just the name. When you are choosing a user directly in the user task UI it shows the "user friendly" name, but behind the scenes it is referencing the underlying account.

When you use a variable for task assignment, it needs to be the account not just a name. For example, if you're using Windows accounts, it would be domain\username.

We use a similar approach for several of our form processes; in our case when a user's name is selected, we use lookup rules to pull the actual username and populate that to a hidden field with the domain\username format for task assignment.

4 0
replied on September 10, 2024

Same. I have a SQL view that contains a list of our AD accounts, and that view also has a computed column that concatenates "domain\" with the SamAccountName. I can then lookup the column using that view and fill the field to use for task assignment.

3 0

Replies

replied on September 10, 2024

So from what it sounds like, You both Created a Sql Table that stores the User names for the Lookup..  "Friendly Name" and "Domain\user name".

 So when the user of the forms Either Types in the user it will query the table and fill in a hidden fields that i can then user to assign the task to.. 

I have a similar table built to prefill other info on other forms that i have built. I will give it a shot..

Thanks Chris

0 0
replied on September 10, 2024 Show version history

Yes, that's correct. If you already have tables for that then you should be good to go, but if not, you can also use ADSI (linked server) to run real-time queries against AD via SQL.

Additionally, I add a lookup with no condition on the "Name" field so they can start typing and just select from the list to help ensure they enter the right name so it can lookup the domain account.

0 0
replied on September 12, 2024

Thanks for all the great Help..

 

Chris

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.