Hi,
I have a flow run from a selected sharepoint item. The sharepoint list uses a lookup column with numbers in it but converts to string in my flow.
I need to convert the string into currency with 2 decimal places only.
This is currently what I am getting from the flow:
Hi there,
Try this:
I answer questions on the forum for 2-3 hours every Thursday!
Hi @Rhiassuring ,
Thanks for that, could you show me as a flow?
I haven't created a variable before. I also have tried the other way but it didn't work.
You don't need to use a variable - you only need to replace the part of the expression I showed you with the output from where ever your number is coming from.
For example:
formatNumber(float(variables('strInitial')),'C2','en-US')
The part in orange is the part that you will use Dynamic Content for.
Dynamic Content is what we call the automatically created items that are available for use when you've used an action, like Get Item - like this:
To use the expression I've shown you, use a Compose action, then click the "Expression" tab. You'll see it to the right of Dynamic Content, above.
Highlight the part that I've shown you in orange (within where you've copied the expression), and backspace it.
Then, click on the Dynamic Content tab, and select the field that you want to apply to expression to. Then, click "OK". The expression will appear in a concatenated purple box in your compose, like this:
Now you can use the output of your Compose (shown in your Dynamic Content like this, in future actions:
Whereever you need to - emails, to update another item, to add to a task - whatever.
If you are getting into using Power Automate, I'd recommend reading up on how to use variables and data operations - they will help you immensely in your journey, as they are used in pretty much every flow. I find that Manuel T Gomes is a great source for this kind of foundations learning - here are some blogs for you to check out:
Variables...
https://manueltgomes.com/reference/power-automate-action-reference/set-variable-action/
An example of a Data Operation, "Compose"
https://manueltgomes.com/reference/power-automate-action-reference/compose-action/
You can see all the Data Operations by searching Data Operations when you go to add an action in flow, then just Google that action + Manuel T Gomes .. he seems to have something on everything. CC @manueltgomes
Cheers,
Rhia
I answer questions on the forum for 2-3 hours every Thursday!