cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GuyBoswell
Advocate II
Advocate II

Compose v. Variables

Hi All,

I am new to Power Automate but learning fast.  I am not a programmer, more like a smart user, so Power Automate and Power Apps seem ideal to me.  I learnt programming in Basic on a ZX Spectrum about 100 years ago.  I probably haven't really developed much beyond that, just adapted.
So I am used to declaring and setting variables.

Power Automate has steps for Initialize variable, Set variable and Format number.  These feel very familiar so I started using them.  But Format number, although it works fine doesn't seem to be useable in emails - at least not more than one formated number at a time.  I was advised to use Compose.

Now hang on one minute!?!  Compose seems to do away with the need for initialising, setting and formating variables - you can do them all in one step.  Fantastic!  So what am I missing?  Is there any reason not to use Compose everywhere and just do away with Initialize, Set and Format variables?

Well only one reason I have seen.  You can't readily search for Compose items in dynamic content.  You can search for, "outputs" and they are all listed.  But if you have a lot of them they are difficult to find, especially as they sort not alphabetically but in the order they were created.

OK! two reasons.  The 'Inputs' box and the, 'Expression', box are tiny and totally rubbish if you want to nest more than one function. 

I really would be interested in your thoughts.  Thank you,

Guy

3 REPLIES 3
ChristianAbata
Super User II
Super User II

hi @GuyBoswell  see everyting is about the data type, see when you said

 


@GuyBoswell wrote:

 

But Format number, although it works fine doesn't seem to be useable in emails - at least not more than one formated number at a time.  I was advised to use Compose.


this is because in body emails you need to add string variable that means text not int or others.

The secrete is on the datatype 😉

So you can iniciatize string variables too or array variable or int or double. 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Hi @ChristianAbata 

 

No, not sure it is that simple.  The datatype works OK.  I can add any one of my formatted numbers in an email and the email delivers fine.  Sometimes I can add two or three.  But if I add any more than that the email fails.  And the really odd behaviour is if I then delete the formatted number from the email it doesn't start working again.  I have to delete all the formatted numbers and start again.  Anyhow, there is an easy work around, use Compose.

 

So my point is if Compose works, why not use Compose everywhere and just give up on variables?

 

Guy

ohhh @GuyBoswell  its a good question, see in my experience I just use variable when I want to append something in there like a value from other action, or when I what to increment o decrement something. And Compose to know the result from action properties and do transformations with expression.s



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (35,684)