This is so weird! I have a Field with a Default Formula, which works perfectly:
- this correctly displays $14000 as the Value
BUT if I update the formula to change a single digit in one of the multipliers:
- this displays nothing as the Value - and there are no errors on the Formula!
The parameters and all of the Properties of the Field have remained the same - all I did was changed a single digit - but it refuses to display. I extended the box in case the number was too big to be displayed without some sort of text wrap but that wasn't the fault.
Has anyone come across this before?
Solved! Go to Solution.
Can you share what you have inputted into DataCardValue74_1? What type of control is it? Text input? Dropdown?
It's very important to understanding what you're experiencing.
I also notice you are manually inserting $ and cents.
Can you try this:
Here, I'm assuming DataCardValue74_1 is a text input box (see my first question). Because it is text, I convert its text into a value for the calculation. I perform the multiplication. Note that I specifically call out the Text property of DataCardValue74_1 as a best practice even if I do not need to.
Then I use the Text() function to format the result of the multiplication to include a dollar sign in front, a comma past the 3rd whole digit, and two decimals for cents.
If no value comes out of the calculation, it will at least result in $0.00 because I formatted it that way.
Let me know what comes out with some screenshots.
@AdamGill, I'm glad you got it working. Though I would highly encourage you to use the Text() function when formatting a number in the way that you want.
Suppose you have negative and positive numbers to be formatted. Your existing solution would work for positive numbers. But if you have a negative number, it would appear with the negative sign inside like this because the concatenation is literal (left to right):
Using the Text function I recommended, the negative sign appears outside and with commas and decimal places where you designate:
The dollar sign, comma, and decimal are understood in the context of the Text() function. But when concatenating them individually, there's no context that you're working with numbers--they would just be treated as strings.
I needed to find a way to encapsulate the pure number in a SharePoint Data Row which sits behind this Form equation because I use that in a number of math equations. In this instance I needed to display that pure number as currency, hence my formatting. The number will never be negative, so I did not need to take that into consideration. The part that concerns me the most is that the math engine behind PowerApps failed on a simple task, as explained in my original post!
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021