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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Compose and variables

(0) ShareShare
ReportReport
Posted on by 46

Hi everyone,

 

I have a ms Forms which trigger my flow. In the Form I have an formNumber that start with a number following by letters. What I want to do is read that number and set a variable with an email. I have 50 emails.

For exemple.

 

If my formNumber start by 001 then variable is "asdadf@gmail.com

If my formNumber start by 002 then variable is asdfd2@hotmail.com

if my formNumber start with 003 then variable is asdfaei.casj@gmail.ca 

 

I dont want to use the conditional in PowerAutomate because is going to be so long.  So I wonder if I can use COMPOSE instead.

 

Anyone can help me with this please.

 

Categories:
I have the same question (0)
  • Verified answer
    ScottShearer Profile Picture
    25,294 Most Valuable Professional on at

    @tguihur 

    If I understand you correctly, you have 50 separate email address that you may want to assign to the variable.  If that is the case, then I suggest storing the numbers from the form along with the related email addresses in a SharePoint list or Excel table.  Then, just lookup the email address.  You can then store that information in either a compose action or variable.  Then reference the variable or compose action as needed.

    As a general rule, you should use a compose action unless you'll need to update the value.  Compose actions are much more efficient than variables.  

    Let me know if you need additional help implementing the lookup or extracting the form number.

     

     

  • VictorIvanidze Profile Picture
    13,081 on at

    Hi @ScottShearer, could you please explain why you said "Compose actions are much more efficient than variables"?

    What' the difference in terms of efficiency?

  • ScottShearer Profile Picture
    25,294 Most Valuable Professional on at

    @VictorIvanidze 

    My understanding is that variables need to be evaluated every time you reference them and Compose actions do not.  Therefore Compose actions run more quickly and theoretically will consume fewer API calls, etc..

    Here is a link to a great video by @MattWeston365 that explains when and why to use each.

  • tguihur Profile Picture
    46 on at

    Thank you @ScottShearer for your answers and explanations. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard