Skip to main content
ankushs0002
March 19, 2025
Question

Weird behaviour of user when i use to convert emails to 'touser'

  • March 19, 2025
  • 9 replies
  • 0 views

As I am getting a list of text strings separated by semicolons in a single line, my focus is to split them into different values. After that, I need to convert them to users using the touser() function. However, it is currently showing [ID NOT FOUND] even though the email address is already present in Appian users.

9 replies

March 19, 2025

Are you sure the users' username (not e-mailadress) is that exact same string?
Try achieving touser(USERNAME) for this user in isolation and see if it works. In other words, divide up the logic and test each step such that the location of your problem becomes more evident.
Also you might want to mask existing e-mailaddresses

pavithraa1452
March 19, 2025

Have you checked the casing of username? If the username is test.test@gmail.com and when we try to do touser(Test.Test@gmail.com) we get this kind of error. 

mathieud0001
March 19, 2025

I think casing is most likely the issue.

stefanhelzle0001
March 19, 2025

I think the issue is that you defined the rule input as a list of text, but then pass ONE string that contains two items.

March 19, 2025

While your point is valid I have doubts on whether that is the issue here.

Appian seems to adjust to it.
Testing the setup does produce 2 proper items for the forEach loop..

mikes0011
Brainy
March 19, 2025

Temporarily remove the "touser" call from inside your a!forEach loop and ensure the (now text) output matches your expectations.  And, I guess, double check that the email address you're trying to pass actually is a *username*.  You could also replace "touser" with one of the user-checking functions (may or may not require the People Functions plugin) like "isUsernameTaken()", etc, and see what that returns as well.

March 20, 2025

Is the username the same as the email? You might encounter this issue if they are different.

ankushs0002
March 20, 2025

I have solved this issue by checking isusernametaken() function so it is working smoothly right now !!!!

ankushs0002
March 20, 2025

Thanks you everyone for your help and reach out to my question.... I have solved this issue by adding isusernametaken() function...