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
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?
Hi scotth82, yes, I do have expressions in the flow, for instance in Start an approval step I'm reading Price as
Anyway, how do I publish the flow here? Screenshot or ...?
So, here are some screenshots:
This is a situation in Sharepoint List:
These are setting for columns in Sharepoint List:
And here is a result of a Flow test (or rather result of the first step of the test):
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.
Maybe you could try to recreate a Column of Currency type in the SharePoint list and then reconfigure the Flow.
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":
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...
Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020.
Fill out a quick form to claim your user group badge now!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Flow Community Video Gallery!