• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • 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
        • savesetting Function
        • SetLanguage Function
        • SetProperty Function
        • SetValueSet Function
        • 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
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <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, Audio, Document, Geometry, Image
Decimal(integer)
DecimalCharYes, No
Len(integer)
ZeroFillYes, No
 
Field Properties
AllowMultiLineYes, No
AlwaysVisualValue✔Yes, 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