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
You cannot execute SavePartial until the ID items are filled in
You cannot execute SavePartial until the ID items are filled in
- Attachments
-
- CSP.PNG (28.1 KiB) Viewed 3165 times
-
- Test01.zip
- (1.13 MiB) Downloaded 213 times
Re: You cannot execute SavePartial until the ID items are filled in
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.
Re: You cannot execute SavePartial until the ID items are filled in
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)
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
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;
Your guidance on this regard is highly appreciate
Thank you again
Leulae
Re: You cannot execute SavePartial until the ID items are filled in
In that case you could do:
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.
Code: Select all
if visualvalue(SERIALNUMBER) = notappl then
Instead of top of the case tree you might also consider the userbar.
Re: You cannot execute SavePartial until the ID items are filled in
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
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