SetValue
Listed below is the syntax, description, parameter and return value for "SetValue."
Method Syntax: return_value = SetValue(parameter_1, parameter_2)
Description: This method is used to request the transfer to the LMS of the value of parameter_2 for the data element specified as parameter_1. This method allows the SCO to send information to the LMS for storage. The API Instance may be designed to immediately persist data that was set (to the server-side component) or store data in a local (client-side) cache.
Parameter:
- parameter_1 – The complete identification of a data model element to be set.
- parameter_2 – The value to which the contents of parameter_1 is to be set. The value of parameter_2 shall be a characterstring that shall be convertible to the data type defined for the data model element identified in parameter_1.
Return Value: The method can return one of two values. The return value shall be represented as a characterstring. The quotes ("") are not part of the characterstring returned, they are used purely to delineate the values returned.
- "true" – The characterstring "true" shall be returned if the LMS accepts the content of parameter_2 to set the value of parameter_1.
- "false" – The characterstring "false" shall be returned if the LMS encounters an error in setting the contents of parameter_1 with the value of parameter_2. The SCO may call GetLastError() to determine the type of error. More detailed information pertaining to the error may be provided by the LMS through the GetDiagnostic() function.