cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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
Highlighted
Super User III
Super User III

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
Highlighted

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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (19,455)