View/review only mode

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
cbmsdev
Posts: 2
Joined: May 17th, 2022, 10:55 pm

View/review only mode

Post by cbmsdev »

Good Day CSPro Team,

Is there any way that i can make the data (from a csdbe file) in an open CSEntry available for viewing only? the modification of data that are already encoded is prohibited. It's like review mode of the contents of csdbe using csentry. I tried modifying the .pff file by adding lock commands but unfortunately it does not work.

Thank you so much in advance! :D
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: View/review only mode

Post by Gregory Martin »

There's no explicit view/review mode, but it is something that we've talked about adding to a future release.

A workaround is to either:

1) Create a copy of the data file and open that in CSEntry. That way, if the data is modified, it doesn't really matter since the modified data was part of the copied file.

2) Add a custom flag to the PFF that indicates that you are in review mode. Then in logic, whenever data might be saved, you check the flag. For example, you might have a custom partial save function:
function CustomPartialSave()

    if sysparm("REVIEW_MODE") <> "1" then
        savepartial
();
    endif;

end;


PROC LAST_ENTITY_OF_APPLICATION

    // prevent the finalization of the questionnaire in review mode
   
if sysparm("REVIEW_MODE") = "1" then
        stop
(0);
    endif;
cbmsdev
Posts: 2
Joined: May 17th, 2022, 10:55 pm

Re: View/review only mode

Post by cbmsdev »

Thank you so much for this, Sir! :D
Post Reply