Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Need to set a numeric value (Late Fee) if the Current Date is past a set date.

$
0
0

Need to set a numeric field (Late Fee) if the Current Date is past a set date (3/31/17).  To test in Preview mode, I was using the set date as 1/1/17.  This is for a recreational softball registration form.  If the user prints the form after 3/31/17, then the Late Fee of $10.00 will auto-populate in the Numeric Field, LateFeeCalc.

 

My JavaScript set on the numeric field on the initialize event (because the date is set to current date when form is opened).  There is no calculation involved.

 

 

 

 

 

if (Date2Num(SubFormCommands.MasterPage.PAGE2.RegistrationForm.Details.CurrentDate.formatted Value, "MM/DD/YYYY") >

 

Date2Num("01/01/2017", "MM/DD/YYYY") then $=10

 

I have tried to tweak this several ways and received a variety of syntax errors surrounding the then portion of the statement.  I have replaced the "then" with brackets but no change.  I have tried to set variables, but no change.  When I rarely received no syntax error message, the functionality simply didn't work.

 

PLEASE help with my code, ASAP!  I am a self-taught "noob" and have only ever worked with SQL on a very high level.

 

Many thanks,


Viewing all articles
Browse latest Browse all 5571

Trending Articles