SCRWrite()
![]()
Writes data to the contents of a field.
Syntax
SCRWrite(<cField>, <xData>, [<aList>])
Arguments
<cField> --> Name of the field to write data to.
<xData> --> The data to write.
<aList> --> If the field is a list, then you may specify a list as an array of character values.
Returns
Returns a Nil Value.
Description
Use this function to write data to the contents of the specified field. The data you specify should match the field type of the field you are writing information to. This function updates the contents of the field on the screen. Data is not saved to the database until the user presses the button.
The
SCRWrite() function enforces any special constraints set by the Input Clause
of the field. Any data you attempt write to a field that disobeys the Input Clause
condition will automatically be rejected.
For example, consider this Input Clause:
@! NNNNNNNN
This enforces the rule that the field must be entirely in upper case (@!) and the first 8 characters entered must be alpha-numeric only (N). If you attempt to write punctuation characters to such a field they would be rejected.
This function:
SCRWrite("MyField", "@ABC#")
would only result in the characters "ABC" being placed in the field.
Example #1
Write a value to a character field:
SCRWrite("Myfield1", "Test 123")
Example #2
Write a value to a list field and specify a new list to choose from:
SCRWrite("MyList1", "Jan", { "Jan", "Feb", "Mar", "Apr", "May" } )
Example #3
Retain the value of an existing list field and specify a list to choose from:
SCRWrite("MyList1", SCRRead("MyList1"), { "Jan", "Feb", "Mar", "Apr", "May" } )
____________________________
Related Topics:
![]() |