I have a club membership application form I am creating. I want to permit a membership discount of 10% if it is the months of April thru October,
I have set up a field that does that calculation (currently visible and active in the calculation stream below it). I want that field to disappear from the user's view and have that calculation go dormant from November 1 thru March 31, or the months of November thru March.
I have been using FormCalc. Any ideas?
Gordon
Solved! Go to Solution.
Views
Replies
Total Likes
You can try the following code in the Initialize event..
if(Num2Date(Date(),"M") >3 and Num2Date(Date(),"M") <11) then
//Write the code meant for Apr - Oct time frame
DiscountField.presence= "visible";
else
//Write the code for Nov- Mar time frame
DiscountField.presence= "hidden";
endif
Similarly, you can use the same if condition in the calculation code for the discount..
Thanks
Srini
Views
Replies
Total Likes
You can try the following code in the Initialize event..
if(Num2Date(Date(),"M") >3 and Num2Date(Date(),"M") <11) then
//Write the code meant for Apr - Oct time frame
DiscountField.presence= "visible";
else
//Write the code for Nov- Mar time frame
DiscountField.presence= "hidden";
endif
Similarly, you can use the same if condition in the calculation code for the discount..
Thanks
Srini
Views
Replies
Total Likes
Thanks so much, your code was absolutely correct. As someone who learned programming in Fortran almost 40 years ago, the nuances of modern languages , like Java, can sometimes escape me. To me the FormCalc documentation wasnt exactly clear to me either. I was making it more complicated than it needed to be. Call me a relic. Thanks again
Views
Replies
Total Likes
Views
Likes
Replies