cancel
Showing results for 
Search instead for 
Did you mean: 

Travel PDF sum line

Former Member
0 Kudos

Hello,

I've added some new fields to my Z form that we're using for travel. My question relates to the "sum" line for the section that I've added the fields to. 

Here's my simplified example

Meal Per Diem

From          To     No     Location     Flat rate     Amount

1/1             1/3     2        London     175.00         350.00

1/3             1/4     1        London       87.50           87.50     

            Sum of Meal per Diems          0.00         437.50

I added the Flat rate field, to show the per day base amount,  I want to be able to HIDE the 0.00 in the sum line under the flat rate column.  How can I do that?

Also, the sum line is highlighted in yellow, except for the space under the flat rate column, how can I add color to this section of the sum line? 

Thank you for any help you can provide. 

Don

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Don,

If you have added the Sum Line 0.00 as a floating field in the z_form, you must have binded it with one of the fields from your context tab. You can hide this field using formcalc. Goto the subform under which this field reides and in the formcalc write the code like this:

if ($."field_name".rawvalue == "0") then

$.field_name.presence = "hidden"

endif.

Hope this will help you.

If I am wrong in assuming about floating field please give detailed explanation about how you have defined that field which sums your flat rate and bring it in the sum line.

Please reward if helpful.

Regards,

Nitin.

Former Member
0 Kudos

Thank you very much for your response. even though this was not the answer to my issue, it did start me down the correct road to find the solution to my problem. 

The actual solution to my issue was adding the following XML code to the sum line.

$.parent.field_name.rawvalue = ""

by adding this line of code, the 0.00 from the flat rate column is not displayed in the sum line

Answers (0)