Page 1 of 1

Use SetProperty instead of Set Attributes Statement on CSPRO 7

Posted: March 17th, 2021, 5:56 pm
by Boni
Hello everyone!
I read this on the help of CSPro : Starting with CSPro 7.1, you should no longer use these functions as they may soon be removed from CSPro. To replicate the behavior of the functions, you can use the setproperty function with one of the following arguments: "CaptureType", "Protected", or "UseEnterKey".

So I wanted to replace my Set atributes Statement used to change the values of various field properties by setProperty, but it does not work. How can I use SetProperty to allow the modification of a protected field for example, please?

Re: Use SetProperty instead of Set Attributes Statement on CSPRO 7

Posted: March 17th, 2021, 8:44 pm
by josh
To make a field protected use:

Code: Select all

setproperty(FIELDNAME, "Protected","Yes");
To make it NOT protected use:

Code: Select all

setpropertyFIELDNAME, ("Protected","No") 
Full list of options is in the help for SetProperty https://www.csprousers.org/help/CSPro/s ... ction.html