Dear Codepeople
Thanks so much for your video. ?? I really appreciate your efforts !!
In my own attempt to fix this function, I opted to change from the function from days to months to read as follows:
GETDATETIMESTRING(DATETIMESUM(fieldname39, ‘mm-dd-yyyy’, (-24), ‘m’, true), ‘mm-dd-yyyy’)
And this latest reiteration seems to work much better regardless the number of the months subtracted from the future date (fieldname39).
The end goal is enter one date value, once, into the (fieldname39) and have the CFF form automatically update the calendar values for the whole form. With this first automation piece of the function puzzle now resolved, is it possible to use another fieldname to complete countdown days left each time this code is repeated but with a different month variable?
Eg:
GETDATETIMESTRING(DATETIMESUM(fieldname39, ‘mm-dd-yyyy’, (-24), ‘m’, true), ‘mm-dd-yyyy’)
Get Countdown days from 24 months of fieldname39?
GETDATETIMESTRING(DATETIMESUM(fieldname39, ‘mm-dd-yyyy’, (-12), ‘m’, true), ‘mm-dd-yyyy’)
Get Countdown days from 12 months of fieldname39?
GETDATETIMESTRING(DATETIMESUM(fieldname39, ‘mm-dd-yyyy’, (-5), ‘m’, true), ‘mm-dd-yyyy’)
Get Countdown days from 5 months of fieldname39?
Of course, I know the code for countdown would need its own field placeholder for each (24,12,5 mths)to delivery the three countdown outputs.
Or is the GETDATETIMESTRING(DATETIMESUM(fieldname39, ‘mm-dd-yyyy’, (-5), ‘m’, true), ‘mm-dd-yyyy’) now too complicated to create a countdown days code?
In my own attempt for countdown, I used this code (below) but it did not work.
PREC(abs(fieldname39-fieldname36),0)
In advance, I thank you for all your help so far.
Best Regards
jh