cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
imagodei
Level: Powered On

Flow is casuing major confusion with numbers/prices

I'm trying to build Approval process for Suggested Purchases with Flow that takes Sharepoint list element for an input. Flow runs whenever new element is added to a list.

So, the user creates a new Suggested Purchase item in Sharepoint list. From there Flow picks up, sends Approve/Reject email to Manager and upon receiving Manager's response it updates the list and sends email notification back to user.

There's a number column/field in the List where Price of an item is recorded. I come from Slovenia and we use comma as a decimal separator. So for instance 20,10 € equals 20 Euros 10 cents. But the Flow apparently has problems interpreting numbers and keeps messing up the number: As soon as Flow reads the new element from list and sends email to Manager the Price changes to 2010 (two thousand and ten Euros). You might imagine this is not OK - instead of the correct price of 20 € 10 cents the Manager receives request for an item that costs 2010 €.

 

When Manager Approves (or rather Rejects) the purchase, Flow updates the Price in Sharepoint list with value 2010. Then there's the added bonus where Flow also messes up the text fields by adding some html markup. This then shows both in email to the Manager and in Sharepoint list text fields after Purchase is Approved or Rejected.

 

I've no idea if I'm doing something wrong - but if that's the case, I can't imagine what. I've tried setting up field/column in Sharepoint list as a Currency and also as a string. I've also tried tweaking Entry Form in PowerApps and casting the number entered specifically as a string, but no success. I've Googled a lot but noone seems to have quite the same problems. I can't imagine where this confusion with data and formats is arising.

 

I can provide screenshots of the Sharepoint settings, Flow (but it's partially in Slovenian language, sorry), or anything else if it helps diagnosing problem - just say what you need to help me out with this. This really seemed as a easy and straightforward thing that would take 30 minutes, tops, but here I am almost 2 weeks later and I have nothing to show to my manager. So - help me out, please 🙂

5 REPLIES 5
scotth82
Level: Powered On

Re: Flow is casuing major confusion with numbers/prices

Hi Imagodei,

 

It's quite hard to set this up and replicate without seeing the flow but have you considered using an expression with your dynamic content for price when passing from the list to the approval email and back again?

 

Scott

imagodei
Level: Powered On

Re: Flow is casuing major confusion with numbers/prices

Hi scotth82, yes, I do have expressions in the flow, for instance in Start an approval step I'm reading Price as

string(triggerBody()['Price'])

Anyway, how do I publish the flow here? Screenshot or ...?

imagodei
Level: Powered On

Re: Flow is casuing major confusion with numbers/prices

So, here are some screenshots:

 

This is a situation in Sharepoint List: 

2018-10-10 09_42_36.png

 

These are setting for columns in Sharepoint List:

2018-10-10 09_54_11-Clipboard.png

 

And here is a result of a Flow test (or rather result of the first step of the test):

2018-10-10 09_27_07-Clipboard.png

Community Support Team
Community Support Team

Re: Flow is casuing major confusion with numbers/prices

Hi @imagodei,

 

I did a test on my side, I created a Column of Currency type in the SharePoint list.

Then create a Flow, using When an item is created, the output value of the Currency type Column is correct, and the error you mentioned does not occur.

56.PNG

 

58.PNG

Maybe you could try to recreate a Column of Currency type in the SharePoint list and then reconfigure the Flow.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
imagodei
Level: Powered On

Re: Flow is casuing major confusion with numbers/prices

Hi Barry,

thank you for your effort. I've recreated the Column like you suggested, fixed the Flow and switched back to Sharepoint default Form (I made some changes to Input form in PowerApps trying to fix the problem, but to be sure nothing is interfering, I reverted to vanilla Sharepoint Form). Unfortunately, the Price in the email was still incorrect, showing as 2437 €.

 

This made me think that part of the problem is maybe in my understanding of the Test Flow procedure. I was testing the Flow with "Using data from previous runs":

2018-10-15 11_02_48-Clipboard.png

And the Flow apparently never actually updated the data entered in the Sharepoint form but always used the existing data it captured in the first run I did... (Yes I know the radiobox in the image above says "Use data from previous runs"). It never occured to me that Flow Test procedure actually used old (cached) data instead of retrieving fresh data from Sharepoint list - especially when at the end it actually updated data in the list - so why wouldn't it also use the latest data from the list to begin with, right?

 

So, while there initially was a problem, I wasted quite some time changing the Form in PowerApps trying to fix the behavior but I never actually tested the reading of data from the List into the Flow. All I did was testing how Flow is working with the ancient data. Garbage in, garbage out, I guess.

 

Anyway, I have to test this a bit more to be sure it works also with PowerApp customized Form, but so far it looks promising...

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,641)