Condition on calculated field

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Katy
Posts: 145
Joined: Wed Dec 02, 2015
Location: Canada

19 Nov 2019

I have a simple condition on calculated field value (stored as number), but it is not working (i've read this already):

Code: Select all

function setapproval() {
var calcValue = parseFloat(fd.field('ConvertedTotal').control()._el().text()); 
if (calcValue > 5000) {
    alert(calcValue);
  } 
}
setapproval();
The calculated field is number, but i already tried to make it text - nothing. The code is on Display form. I've tried to store the calculated field as text - didn't help.
Please help!
Last edited by Katy on 19 Nov 2019, edited 1 time in total.

Katy
Posts: 145
Joined: Wed Dec 02, 2015
Location: Canada

19 Nov 2019

update: i figured out the reason: because the calculated number is XXXX it shows as x,xxx so the system recognize only the part before coma,
40,450 is only recognized as 40 so it is less then 5000... how i can go around that? the numbers would 99,9% by higher then 5000, so how i can ignore those comas after thousands?

Katy
Posts: 145
Joined: Wed Dec 02, 2015
Location: Canada

19 Nov 2019

Update: I found the solution!))
I wrapped my calculation into this:

=text([NumberColumn],"0.00")

and it works as a clock!) :D

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests