web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Search for User (V2) w...
Power Automate
Unanswered

Search for User (V2) with variable

(0) ShareShare
ReportReport
Posted on by 97

I'm probably missing something here but I have a variable that's a string type from a prior step called 'NameVariable'

 

to which I'm passing to the Search for users (V2), however results are coming up null.

But when I hard code 'John Doe' into the search it works.  What am I missing here? Do I need to convert the variable that's a string to something else? Compose also doesn't work.  

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,073 on at

    Could you show Search for User (V2) with variable in edit mode?

  • IncursioML1 Profile Picture
    97 on at

    It's coming from the text body of an HTML email.

     

    Here's the two outputs if using a variable vs. hardcode in the output.

    There's probably another step I have to do due to the HTML email conversion to text in which the variable is using the final output as a string.

     

    Output of Variable
    "searchTerm": "@variables('FinalBuyerName')",
    "searchTerm": "\n\nJohn Doe\n\n",

     

    Output of HarcCode
    "searchTerm": "John Doe",

  • VictorIvanidze Profile Picture
    13,073 on at

    Well, just remove all \n from variable.

  • brindly Profile Picture
    24 on at

    I'm seeing the same thing, When hard coded, the search string works fine, but when passed from a variable, its Null. Any idea please?

  • brindly Profile Picture
    24 on at

    Sorry about my previous message, It worked. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard