Skip to main content
micheller78368722
Participating Frequently
April 28, 2016
Question

I am trying to create YTD fields on a form. I unchecked the field on Reset Form but they are still getting reset. What can I do?

  • April 28, 2016
  • 1 reply
  • 891 views

I am trying to create YTD fields on a form. I unchecked the field on Reset Form but they are still getting reset. What can I do?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
April 28, 2016

Are you setting their value with a script? If so, make sure you also set the default value to the same string. Then they will maintain their values even when reset.

micheller78368722
Participating Frequently
April 28, 2016

Here is the script I am using to calculate the YTDAmt total.

(AmountRow1 + AmountRow2 + AmountRow3 + AmountRow4 + AmountRow5 + AmountRow6 + AmountRow7 + AmountRow8 + AmountRow9 + AmountRow10 + AmountRow11 + AmountRow12 + AmountRow13 + AmountRow14 + AmountRow15 + AmountRow16 + AmountRow17 + AmountRow18)

Inspiring
April 28, 2016

The 2nd screen shot above is the way I'm calculating the YTDAmt.

YTDAMT  then Properties then Calculate. The I keyed in the above

code in the simplified field notation.

AmountRow1 + AmountRow2 + ...

Its adding the fields together okay but I need to retain the

YTDAmt for the following month.


Your approach might not be the best. If you are going to sum up the months activity along with the previous months YTD value in the YTD field, then every time one adds a daily entry the YTD will be added into it. I would look at have having a second YTD field for the previous month and adding that to the  month's activity to creat the new YTD field. This will keep the previous months YTD value unchan ged as new values are added within the month to get to the current YTD value. You will have develop some mechanism to start a new month's sheet with the prior month's YTD value.