Conditionally Autofilliing system date if date is not there in field

Discussions about CSEntry
Post Reply
msoni
Posts: 21
Joined: February 19th, 2024, 11:38 am

Conditionally Autofilliing system date if date is not there in field

Post by msoni »

Hello and Greetings

I have a data entry application where date of survey was as a last item. we were getting it auto filled as system date. Due to some incorrect skip pattern, date were filled for some cases but some cases got skipped for this date field and as a result, we are finding that date blank in the data file.

After correcting the logic, for all future cases, system date is being filled/will be filled without any problem.
But

Now we have got some cases where we have dates missing.

For these missing date cases, we want to fill system date, conditionally if no date is there (Due to incorrect skip), then date should capture system date and if date is already there, no change required.

How should i do that

I was trying like below but did not work. I simply want date to be system date where there is no date filled previously in data file.

Proc date
Preproc
if date=missing // Due to incorrect skip , this is found blank date
date=sysdate("DDMMYYYY");
Noinput;
endif;

But this is not working, This is changing previously filled date also. how should i modify logic, based on my requirement in app.

Thanks and Regards
justinlakier
Posts: 210
Joined: November 21st, 2022, 4:41 pm

Re: Conditionally Autofilliing system date if date is not there in field

Post by justinlakier »

Hello,

Please see the example listed on the VisualValue Function documentation page. You can check if a field is blank by checking if its visualvalue is equal to notappl. VisualValue allows you to check whether anything has been entered for a field no matter where you are in the entry.

Hope this helps,
Justin
msoni
Posts: 21
Joined: February 19th, 2024, 11:38 am

Re: Conditionally Autofilliing system date if date is not there in field

Post by msoni »

Thanks for your reply.
I was also trying visualvalue, but i was rewriting missing instead of notappl.
After changing notappl as suggested, it is working.

Thanks again
Post Reply