Parameter | Description |
---|---|
iItem (Optional) | Item for which to get or set the value (0-based) |
Property String Value
Read Access: | Get Value [iItem] to StringVariable |
Write Access: | Set Value [iItem] to StringVariable/Value |
Contains the value stored in the object. The value is often not an object property but rather an item property. This is why the first parameter is an item identifier. Many controls in Windows applications have only one item (item id = 0). These controls automatically use item zero if no item id is passed, Passing no item id passes the constant current_item which equals to -99 and it is the class responsibility to transform current_item to the correct item number (0 or whatever valid value).
An object need not be visible to set or get its value.
Use Changed_Value to set the value of a data entry object (DEO) if you want the new value to be saved (set the Changed_State of the DEO).
This sample shows how to set the value of a dbForm object.
set Value of dbForm1 to "John Smith"
This sample shows how to retrieve the value of a dbForm object into a string variable.
Procedure RetrieveValue string sValue get Value of dbForm1 to sValue End_Procedure // RetrieveValue
This sample shows how to set the value of item 12 of a dbList object.
Procedure SetListValue integer iItem move 12 to iItem set Value of dbList1 iItem to "John Smith" End_Procedure // SetListValue
This sample shows how to retrieve the value of item 12 of a dbList object into a string variable.
Procedure RetrieveValue string sValue integer iItem move 12 to iItem get Value of dbList1 iItem to sValue End_Procedure // RetrieveValue