Any reason not to reference Current User directly when modifying a thing?

@neerja. Basic, but important question:

Is there any reason not to reference “Current User” directly when modifying a thing = User?

If the above is falable, then should I instead structure the search as follows:

If I pass the “User” to the API workflows, should I reference the User directly or should I do a search for the User like so…?

User field is passed to the action

Action is a modify a thing = User. Do I need to search the DB for the user of can I reference the User directly w/o the Search For?

My understanding is that the current user is always going to be the current “logged in” user.

We always reference the current user directly. One problem I could imagine is if you are scheduling workflows into the future where the logged in user could change. I’m not sure what would happen in that case but my guess is that the new logged in user would have the previous’ action applied to them.

Additionally, whenever we need to modify a non-current user’s thing we will run a search for that user. Sometimes we need to modify several users at a time in which case we will run “schedule a workflow on a list”, search for the users’ list and pass each user as a parameter using the “This User” dynamic option. In that instance, in the api section you wouldn’t want to use current user but your parameter.

Also, I think passing the user as a parameter to the API section and calling that parameter is going to be faster than running a search for the user.

P.S. I love your profile picture! Are you in Minnesota?

Okay. I assume then that I can reference Current User directly so long as it’s the same logged in user.

MN = home, but I went through the Boston transplant likely similar to others on your team.

1 Like

Modifying User thing through current user is perfectly fine. The Current User can be used as any other thing, such as the Current Page Thing, etc.

However, we recommend that you don’t use search for users:first item when you know the exact user.