You cannot execute SavePartial until the ID items are filled in

Discussions about CSEntry
Post Reply
leulae
Posts: 46
Joined: December 16th, 2016, 5:51 am

You cannot execute SavePartial until the ID items are filled in

Post by leulae » November 7th, 2019, 8:31 am

Dear all,

I created a menu driven program and need to facilitate user to “continue”, “save and exit” and “Exit without saving” function at the beginning of data entry program.  For data entry application I pass one ID field through menu program and the other ID should be entered by the user.

This is my intended scenario: When user filling data if he/she willing to exit user should able to use save and exit function. I implemented small demo (attached) but I could not check whether the Serial Number is blank or not, before calling savepartial. It gives the above error message,

Please find the attached program and guide me 

Thanks in advance 

Leulae
Attachments
CSP.PNG
CSP.PNG (28.1 KiB) Viewed 180 times
Test01.zip
(1.13 MiB) Downloaded 9 times

josh
Posts: 1988
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: You cannot execute SavePartial until the ID items are filled in

Post by josh » November 7th, 2019, 11:19 am

Your dictionary has two id-items: DATA_ID and SERIALNUMBER. At the point you do the partial save only DATA_ID has been filled in. In order to do a partial save you need to fill in SERIALNUMBER as well. Try moving the SERIALNUMBER field to come before the EXITORSAVE question.

leulae
Posts: 46
Joined: December 16th, 2016, 5:51 am

Re: You cannot execute SavePartial until the ID items are filled in

Post by leulae » November 7th, 2019, 11:45 am

Thank you for your reply.
I need to keep EXITORSAVE question where it appear. The reason I hope to give “Save”, “Exit”, “Exit without save” functions on the top of the case tree. (Android tablet). As attached image user enters SERIALNUMBER and went through number of question and came back. Serial number is filled. but couldn’t get the value.

I need to check whether SERIALNUMBER field is empty of not before calling partial save. (Image shows it has a value)

Code: Select all

PROC EXITORSAVE
if $=3 then  // Exit
	stop(1);
endif;
if $=2 then //partial save
	if SERIALNUMBER = [u][b]not entered or blank [/b][/u]
		// cannot save no SERIALNUMBER 
	else
		savepartial();
		stop(1);
	endif;
endif;
I think you understand my situation and is there any way to get the SERIALNUMBER value or implement above algorithm.
Your guidance on this regard is highly appreciate

Thank you again

Leulae

josh
Posts: 1988
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: You cannot execute SavePartial until the ID items are filled in

Post by josh » November 7th, 2019, 1:12 pm

In that case you could do:

Code: Select all

if visualvalue(SERIALNUMBER) = notappl then
You need to use visualvalue in this case since EXITORSAVE is before the SERIALNUMBER field.

Instead of top of the case tree you might also consider the userbar.

josh
Posts: 1988
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: You cannot execute SavePartial until the ID items are filled in

Post by josh » November 8th, 2019, 6:41 am

My earlier post was wrong, even if you fill in the serial number, CSPro will not allow to exit partial save while you still are the EXITORSAVE field. I guess it wants you to be past the id-items. You have a few options:
1) move EXITORSAVE so it is after SERIALNUMBER
2) use the userbar instead of a question on the form https://www.csprousers.org/help/CSPro/u ... ction.html
3) use a custom onstop function instead of a question on the form https://www.csprousers.org/help/CSPro/o ... ction.html

Post Reply