I am trying to get a formula to do two operation in one field something like:
form1.#subform[0].yes1.qn1::calculate - (JavaScript, client)
(p1-s1)
then if the value is less than "0" the the value = "0"
what I have so far is not working, any help is greatly appreciated.
if
(this.rawValue < 0)
this.rawValue
= 0;
Thank you.
Solved! Go to Solution.
Views
Replies
Total Likes
I placed the following code in the Calculate event of qn4 field.. Language FormCalc..
If this is NOT what you are trying to do, then please explain in detail..
if((p4-s4)==0)then
$.rawValue = 0;
else
$.rawValue = (p4-s4);
endif
Thanks
Srini
Views
Replies
Total Likes
Try the parseInt function to convert the String to Integer. Otherwise change your control Type from TextField to NumericField.
parseInt(this.rawValue)<0
Thanks
Srini
Views
Replies
Total Likes
Srini,
Thanks for the reply, although I still cannot get this to work.
I changed the fields to numeric and it still is not working.
Views
Replies
Total Likes
Would you be able to send the form to LiveCycle9@gmail.com, so I can have a look at it.
Please mention where the issue is?
Thanks
Srini
Views
Replies
Total Likes
I placed the following code in the Calculate event of qn4 field.. Language FormCalc..
If this is NOT what you are trying to do, then please explain in detail..
if((p4-s4)==0)then
$.rawValue = 0;
else
$.rawValue = (p4-s4);
endif
Thanks
Srini
Views
Replies
Total Likes
I got it now, thank you Srini
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies