Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Need help with simple If-then statement

Avatar

Former Community Member

I two calculated fields:

TotalExpenses

TotalPrepaid

If TotalExpenses > TotalPrepaid, I want it to display the amount.  If it is less than zero, I only want it to display zero.  I can't get it to work.  I tried this, but it isn't working:

if (TotalExpenses.rawValue > TotalPrepaid.rawValue) then

     TotalExpenses.rawValue - TotalPrepaid.rawValue;

elseif (TotalExpenses.rawValue < TotalPrepaid.rawValue) then

     Totals = "0" ;

endif

Thanks, Anne

2 Replies

Avatar

Level 6

Since this looks like an XFA form created in LiveCycle Designer, you should ask this question in the LiveCycle Designer forum. This forum is for forms created in Acrobat.

Avatar

Level 8

Try:

if (TotalExpenses.rawValue > TotalPrepaid.rawValue) then

     TotalExpenses.rawValue - TotalPrepaid.rawValue

else

     0

endif

Kyle