• <Helps for GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
        • Compress Function
        • Decompress Function
        • Diagnostics Function
        • Encode Function
        • ErrMsg Function
        • ExecSystem Function (Desktop)
        • ExecSystem Function (Mobile)
        • ExecPFF Function
        • GetProperty Function
        • GetLabel Function
        • GetLanguage Function
        • GetSymbol Function
        • GetValueLabel Function
        • Hash Function
        • HtmlDialog Function
        • InValueSet Function
        • Invoke Function
        • IsChecked Function
        • LoadSetting Function
        • LogText Function
        • MaxValue Function
        • MinValue Function
        • Paradata Function
        • PathConcat Function
        • PathName Function
        • Report Function (Deprecated)
        • SaveSetting Function
        • SetLanguage Function
        • SetProperty Function
        • SetReportData Function (Deprecated)
        • SetValueSet Function
        • SetValueSet Function With Arrays
        • SetValueSets Function
        • Special Function
        • SqlQuery Function
        • Stop Function
        • SysParm Function
        • Tr Function
        • Trace Function
        • UUID Function
        • View Function
        • Warning Function
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
      • Export Attributes
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Appendix
  • <Helps for CSEntry>
  • <Helps for CSBatch>
  • <Helps for CSTab>
  • <Helps for DataViewer>
  • <Helps for TextView>
  • <Helps for TblView>
  • <Helps for TRSWin>
  • <Helps for CSDeploy>
  • <Helps for CSPack>
  • <Helps for CSFreq>
  • <Helps for CSSort>
  • <Helps for CSExport>
  • <Helps for CSReFmt>
  • <Helps for CSDiff>
  • <Helps for CSConcat>
  • <Helps for TRSSetup>
  • <Helps for ParadataViewer>
  • <Helps for ParadataConcat>
  • <Helps for CSIndex>
  • <Helps for Excel2CSPro>
  • <Helps for CSWeb>

SetProperty Function

Format
i = setproperty(ʃsymbol,ʅ property_name, property_value);
Description
The setproperty function modifies the current property, specified by the string expression property_name, associated with an application or a field. If an optional dictionary symbol is specified, then the property must apply to a field. If the symbol is not a field but is intead a block, group, form, or dictionary, then the function will try to apply the property to all fields belonging to that symbol. If no symbol is specified, then the property must be a system or application property. The property will be modified to the value given in the numeric or string expression property_value.
Properties List
NameSettable?Values
System Properties
MaxDisplayWidth(integer of the maximum display width)
MaxDisplayHeight(integer of the maximum display height)
 
Application Properties
AppTypeDataEntry, Batch, Tabulation
AutoAdvanceOnSelection *M✔Yes, No
AutoPartialSaveMinutes✔(integer of the interval)
CAPIYes, No
CaseTreeAlways, Desktop, Mobile, Never
CenterForms *DYes, No
ComboBoxShowOnlyDiscreteValues✔Yes, No
CreateListingYes, No
CreateLogYes, No
DecimalComma *DYes, No
DisplayCodesAlongsideLabels *M✔Yes, No
NotesDeleteOtherOperators✔Yes, No
NotesEditOtherOperators✔Yes, No
OperatorIDYes, No
ParadataCollectionAllEvents, SomeEvents, No
ParadataDeviceStateMinutes✔(integer of the interval)
ParadataGpsLocationMinutes✔(integer of the interval)
ParadataRecordCoordinates✔Yes, No
ParadataRecordIteratorLoadCases✔Yes, No
ParadataRecordValues✔Yes, No
PartialSave✔Yes, No
PathYes (system controlled), No (operator controlled)
ShowEndCaseDialog✔Yes, No
ShowErrorMessageNumbers *M✔Yes, No
ShowFieldLabels *MYes, No
ShowLabelsInCaseTree *M✔Yes, No
ShowNavigationControls *M✔Yes, No
ShowRefusals✔Yes, No
ShowSkippedFields*M✔Yes, No
SpecialValuesZero✔Yes, No
UpdateSaveArrayFile✔Yes, No
ValidateAlphaFields✔Yes, No
WindowTitle✔(string of the window title)
 
Item Properties
DataTypeAlpha, Numeric
Decimal(integer)
DecimalCharYes, No
Len(integer)
ZeroFillYes, No
 
Field Properties
AllowMultiLineYes, No
AutoIncrementYes, No
CanEnterNotAppl✔No, Confirm, NoConfirm
CanEnterOutOfRange✔No, Confirm, NoConfirm
CapturePosX✔(integer of the X position)
CapturePosY✔(integer of the Y position)
CaptureType✔Barcode, CheckBox, ComboBox, Date, DropDown, NumberPad, RadioButton, Slider, TextBox, ToggleButton
CaptureDateFormat✔(string of the date format, e.g., YYYYMMDD)
ForceOutOfRange✔Yes, No
HideInCaseTree✔Yes, No
Keyboard✔(integer of the keyboard ID)
PersistentYes, No
Protected✔Yes, No
SequentialYes, No
ShowExtendedControlTitle*D✔Yes, No
SkipTo(string of the field name)
UpperCase✔Yes, No
UseEnterKey✔Yes, No
UseUnicodeTextBoxYes, No
ValidationMethod✔Default, Confirm, NoConfirm, Custom
VerifyYes, No
 
*D desktop only, *M mobile only
Return Value
The function returns the number of items whose property was successfully changed. If either the property name or value is invalid, then the function returns default.
Example
PROC CENSUS_QUEST

preproc

   
if STAFF_ROLE = 1 then // interviewer
        setproperty("DisplayCodesAlongsideLabels", false);
       
setproperty(CENSUS_DICT,"CanEnterNotAppl", "No");
       
setproperty(CENSUS_DICT,"CanEnterOutOfRange", "No");

   
else // supervisor
        setproperty("DisplayCodesAlongsideLabels", true);
       
setproperty(CENSUS_DICT,"CanEnterNotAppl", "NoConfirm");
       
setproperty(CENSUS_DICT,"CanEnterOutOfRange", "NoConfirm");

   
endif;
See also: GetProperty Function, Protect Function