Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

DataBinding and Javascript

Not applicable
In the xml data file, we maintain two fields: amount and amountFormatted. For example,



amount: -5000

amountFormatted: ($5,000)



And when do the data-bindings, we only bind the amountFormatted field to the element in PDF.



I am not sure if it's possible to use those fields which are not binded to any elements in the pdf template. Namely,



Instead of comparing string in pdf to control the color

If( this.rawValue.substring(0,1) == "(" ) {

this.fontColor = "255,0,0";

}



Can we use number in dataset to do the comparison

if(Number($record.summary-vO.amount) < 0) {

this.fontColor = "255, 0, 0";

}



Thanks

Alan Ji
0 Replies