Ctrl + F12

Discussions about editing and cleaning data
Post Reply
Adnane
Posts: 30
Joined: November 22nd, 2012, 4:45 am

Ctrl + F12

Post by Adnane »

Hi,

Ctrl+F12 to save Level and finish entry, is ther any way to do this automaticly by function ?

for exemple:

Proc itemx
if itemx = notappl then (do Ctrl+f12)
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Ctrl + F12

Post by Gregory Martin »

Have you looked into the endlevel statement?
Adnane
Posts: 30
Joined: November 22nd, 2012, 4:45 am

Re: Ctrl + F12

Post by Adnane »

In fact, I used 2 level and I created a variable in the second level as a loop to manage my application (creation, modification, save) look a screenshot in attachment piece,
but when I want to stop the entry at level 2, the endlevel statement does not work,
look at my application in piece.
Attachments
Application(Ctrl+F12).rar
Application(Ctrl+f12)
(85.93 KiB) Downloaded 666 times
Screenshot.rar
Screenshot
(70.7 KiB) Downloaded 560 times
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Ctrl + F12

Post by Gregory Martin »

One quick comment: You might consider making the PROJET field a multiline field. It will look nicer in your roster, rather than a really long alpha field. See here for details on how to do this:

http://www.csprousers.org/help/html/tex ... ptions.htm

The problem with your application is that you are setting the OPEON variable on the second level, and then CSEntry wants to save the information for that level. When you call endlevel, you shouldn't have entered any variables on that level.

See attached for a way to write your program by using an external form. You can have the control field on the external form and then use the results of the control entry in the preproc of your second level.

I didn't make the form look pretty, but hopefully you'll understand the point by looking at the program.
Attachments
V4.zip
(9.84 KiB) Downloaded 532 times
Adnane
Posts: 30
Joined: November 22nd, 2012, 4:45 am

Re: Ctrl + F12

Post by Adnane »

I am aware of a multiline field of version 5, in fact, I did not even start working with version 5 because I made several applications with version 4 and I miss a bit of time to convert everything,
I'll try what you've suggested me,
thank you very much
Adnane
Posts: 30
Joined: November 22nd, 2012, 4:45 am

Re: Ctrl + F12

Post by Adnane »

Dear greg,

using an external form is a good idea it solved the problem but I still have another small problem,

to modify or add a level occ I get the following message: " Accept this 'Application' node? " this is not a problem for 1 or 2 level occ, but once I have several levels occ this message will be repeated several times, for example: i have a case with 10 level occ, to access the 10 th level i should clicke 10 times on this message,

to more understand look at the application attached (trying to access the last level occ),

it can be disabled this message?
Attachments
V4.rar
(14.36 KiB) Downloaded 551 times
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Ctrl + F12

Post by Gregory Martin »

If you view your application's Data Entry Options, you can uncheck "Confirm end-of-case." This is what controls the "Accept this..." prompts.

You don't have any control over whether you want it to sometimes issue these prompts, however. I can see the appeal of maybe having it on for the first level, or for the entire case, but that level of control isn't possible.
Adnane
Posts: 30
Joined: November 22nd, 2012, 4:45 am

Re: Ctrl + F12

Post by Adnane »

oh sorry,frankly I forgot this option,finaly the solution was simple,

if you allow me the last one question about this application Mr Greg, I do not know what happening with the option "Insert level Occ", there are some levels that disappear when I use this option between levels, those that are above remain while they are below disappear, I try to introduce an item in the external dictionary with savepartial function but it did not work,

how can I make a save function to avoid this?

to be clear: this occurs only with "Insert level Occ" unlike the option "Add level Occ" that work well.
Attachments
V4.rar
(15.15 KiB) Downloaded 580 times
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Ctrl + F12

Post by Gregory Martin »

The problem is that when OPEON = 0 you save endlevel, which terminates the case after the second level node that you inserted, deleting all of the nodes after the one that was just added. You might try something like this instead:
if OPEON=1 then skip to RAISON_T;

elseif OPEON =2 then skip to TABLEAU000;

elseif OPEON=0 then

    
if demode() = 1 then // in add mode
        endlevel;
    
    
else
        
advance; // advance to the end of the questionnaire
    
    
endif;

endif;
Post Reply