Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Total Formula (Column Total versus Row Total)

Avatar

Level 1

I'm currently working on a table where I need to configure the total amount worked by their pay rate. When I create the total formula it doesn't work. The formula I had was $.rawvalue= Rows.WorkTotal.Cell3 * Rows.PayRate.Cell3. Could I please get some guidance on what I could get done?

7 Replies

Avatar

Level 10

Hi there,

not quite sure what the error can be, you do not give much details about the behavior or any errors that occur...

but by looking at the formula you have written in the forum, let's say rawvalue needs a capital 'V' -> rawValue

Hope this help!

Avatar

Level 1

HI @Mangus069,

The issue Im having if after putting in that formula to in the Total field and switch over the PDF to input the two data (WorkTotal * PayRate) points to get the total the information doesn't show or sum up in the PDF.

Avatar

Level 1

Have you written the script under 'Formcalc' instead of 'Javascript'? and put it for the event 'Calculate'

Avatar

Level 1

Hi Subramaniv22778,

Yes, I have it under the event "calculate" I'm not sure on on the FormCalc instead of Javascript. I'll have to double check. Would it matter if I was working with total columns versus rows?

Avatar

Level 1

Check whether its under 'Formcalc' and Columns Vs Rows?

Avatar

Level 1

Subramaniv22778​, I checked on whether its Formcalc and it was under javascript. And it fixed the issues. The other question I had was do you know what the formula would need to be if I needed put a limited number they could enter? For example, they are putting in the expense amount for meals and it can't exceed $50 per day. How would I go about scripting that?

Avatar

Level 1

if (NumericField.rawValue > 50)

{

xfa.host.messageBox("You can't exceed $50!","Error",3,1);

NumericField.rawValue="";

xfa.host.setFocus(NumericField);

}

Write this under 'Javascript' , for the event 'Exit'. Replace 'NumericField' by your FieldName.