Need Help!!!
Creating forms in Adobe acrobat Pro I could format a number cell to calculate additions/subtractions of currency. If the result was negative I could get the cell to show the negative result in red text and show parentheses around them. How can I do that in LiveCycle?
If i have to use formcalc - what would i type in?
Views
Replies
Total Likes
In LiveCycle can be done using the Numeric Field object and some formcalc script.
Use the "Numeric Field" from the Object Library. For the Field patterns (Select the placed numeric field, On object Window Object -> Field) use "num.currency{}" to show the currency(Ex: $) and "parentheses" if its negative. Write some script to show red text/border in red .
On exit event of the Numeric Field here is the script:
if($.rawValue <0) then $.font.fill.color.value = "255,0,0" endif // This will make entire text in red color if the value is negative.
if($.rawValue <0) then $.validate.nullTest = "error" endif //This will make border of the field in red color if the value is negative.
Hope this helps.
Views
Replies
Total Likes
Raghu,
Thank you for your response.
Q: Same question but - What would it be if it was a negative interger?
Views
Replies
Total Likes
To work for both type of currency formats (Integer($1) and/or Decimals($1.99)), use the pattern as "num{($z,zzz,zzz.zz)}" instead of "num.currency{}". Script will be the same for any pattern.
"num{($z,zzz,zzz.zz)}": z - if digits present it shows, if not it ignores. This will work for -Ve, +Ve integers/decimals too. instead of "z" if placed "9" it act as mandatory. ex: "num{($z,zzz,zzz.99)}". it always gives 2 trailing digits for input numbers.
Views
Replies
Total Likes
Actually, I am refering to an actual numberic interger. like 1,2,3,4...etc
Not currency.
Would it be the same as above?
Views
Replies
Total Likes
Yes. Same pattern will work, but do need to remove the "$" sign, it should be like: "num{(z,zzz,zzz.zz)}".
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies