Several existing control functions were adapted in JavaScript for compatibility with the Ultralight Client to optimally use existing panels with the Ultralight Client.
Below is the complete list of compatible functions as well as their restrictions.
note
The field “area” indicates where the function is executed:
s => Server; The function runs on the server.
l => Lokal; The function runs on the local client.
a => ServerAccess.
Function |
Return type |
Control function |
Area |
Notes & Restrictions |
Debug( string message ) |
void |
s |
Only one string parameter possible. "__LINE__" or "__FILE__" are not evaluated. |
|
DebugN( string message ) |
void |
s |
Only one string parameter possible. "__LINE__" or "__FILE__" are not evaluated. |
|
dpConnect( [bool noLoss,] string cbFunc, [bool wantsAnswer], string dp1[, dp2 …]) oder dpConnect( [bool noLoss,] string cbFunc, [bool wantsAnswer], dyn_string dpList ) |
int |
a |
The additional parameter “noLoss” defines whether all data is requested to be returned or just those values which changed at last. Default value: false; Maximum 8 DP-parameters. |
|
dpConnectUserData( [bool noLoss,] string cbFunc, anytype userData, [bool wantsAnswer], string dp1[, dp2 …]) oder dpConnectUserData( [bool noLoss,] string cbFunc, anytype userData, [bool wantsAnswer], dyn_string dpList) |
int |
a |
The additional parameter “noLoss” defines whether all data is requested to be returned or just those values which changed at last. Default value: false |
|
dpDisconnect( string cbFunc, string dp1[, dp2 ..] ) |
int |
a |
|
|
dpExists(string dpName ) |
bool |
s |
|
|
dpGet(string dpe, anytype value ) |
anytype |
s |
Parameter restriction: Only one data point / value pair possible; Returns “-1” (string) in case of an error; the result is returned into the return value. (Restriction of JavaScript) If the return value is of type dyn_string, following element must not be used: " | ". |
|
dpGetAlias( string dpe ) |
string |
s |
|
|
dpGetComment( string dpe ) |
string |
s |
|
|
dpGetDescription( string dpe ) |
string |
s |
|
|
dpGetUnit( string dpe ) |
string |
s |
|
|
dpNames( [ string dpPattern[, string dpType ]] ) |
dyn_string |
s |
|
|
dpSet( string dpe, anytype value[, string dpe2, anytype val2 …] ) |
int |
s |
No dyn-parameters possible. |
|
dpSubStr( string dp, int pattern ) |
string |
s |
|
|
dpTypeName( string dpName ) |
string |
s |
|
|
dpValToString( dpe, value, unit ) |
string |
s |
|
|
dynAppend( dyn_type x, type | dyn_type y ) |
int |
l |
|
|
dynClear( dyn_type x ) |
int |
l |
|
|
dynContains( dyn_type x, type y ) |
int |
l |
|
|
dynCount( dyn_type x, type y ) |
int |
l |
|
|
dynlen( dyn_type x ) |
int |
l |
|
|
dynRemove( dyn_type x, int pos ) |
int |
l |
|
|
getCatStr( catalog, msgKey[, int langIx] ) |
string |
s |
This function is already replaced by its result during the panel conversion. If the third parameter is not set, the Ultralight Client will use the language of the web browser (if available). |
|
getCurrentTime() |
Date |
l |
Returns only the server time. |
|
getLastError() |
int |
l |
|
|
getLocale |
string |
s |
|
|
getSystemName() |
string |
|
|
|
getUserName( int userId ) |
string |
s |
|
|
getUserPermission(int level int, userId ) |
bool |
s |
When used with the Ultralight Client the function saves the permissions of the current user inside a cache to reduce the number of server requests and increase the performance of the UI. When the user is changed, the permissions for the new user will be requested and the cache will be renewed. |
|
getValue() |
anytype |
l |
The converter replaces this function with the function sdGetValue. The function “getValue” is not implemented on the client side. |
|
invokeMethod(string shape, string attribute, anytype value[, anytype value2 …] ) |
int |
l |
The point notation is replaced for EWOs. Please also refer to restrictions – point notation. |
|
isUltralight() |
bool |
l |
Returns the value „true“ in the web browser and returns the value “false” in the control application. |
|
makeDynAnytype( … ) |
dyn_anytype |
l |
|
|
makeDynBool( … ) |
dyn_bool |
l |
|
|
makeDynChar( … ) |
dyn_char |
l |
|
|
makeDynFloat( … ) |
dyn_float |
l |
|
|
makeDynInt( … ) |
dyn_int |
l |
|
|
makeDynLong( … ) |
dyn_long |
l |
|
|
makeDynMixed( … ) |
dyn_mixed |
l |
|
|
makeDynString( … ) |
dyn_string |
l |
|
|
makeDynTime( … ) |
dyn_time |
l |
|
|
makeDynUInt( … ) |
dyn_uint |
l |
|
|
makeDynULong( … ) |
dyn_ulong |
l |
|
|
makeDynMapping( … ) |
dyn_mapping |
l |
4 entries (objects) are initialized by default. |
|
makeError( [bit32 bit[, int prio[, int type[, int code[, string dp [, int man[, int user[, string note1[, string note2[, string note3]]]]]]]]]] ) |
string |
l |
|
|
makeTime( year, month, day, hour, minute, second, milli, daylightsaving ) |
Date |
l |
|
|
myModuleName( string shape ) |
string |
l |
Can only be used in an embedded module. |
|
patternMatch() |
bool |
l |
|
|
PanelOff() |
void |
l |
|
|
period( Date dt ) |
int |
l |
|
|
setLastError(int errCode ) |
int |
|
l |
|
setPeriod( Date dt, int seconds[, int milli] ) |
Date |
l |
|
|
setValue( string shape, string attribute,anytype value[, anytype value2] ) |
int |
l |
|
|
bool |
l |
|
||
|
|
|
||
strlen( string str ) |
int |
l |
|
|
strpos( string str, string search[, int startPos ] ) |
int |
l |
|
|
strsplit( string line, string/char delim ) |
dyn_string |
I |
|
|
substr( string str, int pos, int len ) |
string |
l |
|
|
throwError( string msg ) |
void |
s |
|
|
toolTipText |
|
|
tooltip texts in html aren't supported. Font and size depends on the utilized browser, as well as the display duration and the switch-on time. IE8 with Adobe SVG viewer isn't supported anymore. |
|
trim( string str ) |
string |
|
l |
|