Switching partial save flag programmatically

Discussions about CSEntry
Post Reply
alex_izm
Posts: 19
Joined: December 9th, 2016, 11:31 am

Switching partial save flag programmatically

Post by alex_izm »

Dear CSPro team,

The static "PartialSave" flag is set in the .ENT file of the entry application. Is there a way to switch this flag programmatically from within the application code? I know it is possible to save a case using partialsave() function, but I would like to have the option of running the application with either enabled or disabled partial save, without having to maintain two separate .ENT files.

Thanks!
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Switching partial save flag programmatically

Post by josh »

There is no way to set that flag programmatically. You could always disable it and then in logic add a userbar button that calls the partialsave() function. You could only add this userbar button when you want to allow partial save.
alex_izm
Posts: 19
Joined: December 9th, 2016, 11:31 am

Re: Switching partial save flag programmatically

Post by alex_izm »

josh wrote:You could always disable it and then in logic add a userbar button that calls the partialsave() function. You could only add this userbar button when you want to allow partial save.
Aha, this is very clever. Thank you!

I guess the only thing you lose is that "Partial save" button when you "X" out of the CSEntry window. But this is not that big of a loss. Your solution would work in my case.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Switching partial save flag programmatically

Post by josh »

You can also emulate the partial save on Window close option by using a custom onstop() function. However doing that adds another complication. When restoring from partial save you don't get the "go last position" dialog. There is a workaround for that too though which is described in the help for OnStop().
Post Reply