Other Functions
f-switch
This function performs the following:
- Sets the global variables (e.g. bookdate)
- Sets the department as per session
- Builds a string with all the deparmtent/levels
- Sets the new session record
ReturnType : Logical
AppliesTo : Session data of user
Used as:
This function is used as f-switch().
f-dispthistime
The function displays time in ‘HH:MM:SS’ format as the number of seconds since midnight.
ReturnType : Character
AppliesTo : Data
Used as:
f-dispthistime(3600) returns 1:00:00
Input Parameters
Parameters | Data Type | Description |
---|---|---|
h-thistime | Integer | Integer value which is converted to format “HH:MM:SS” |
f-superuser
Find if the user is superuser. conditions :
- xdatctype = “D” (development, always superuser)
- xuselsuper = True
ReturnType : Character
AppliesTo : Data
Used as:
f-superuser().
f-dynafunc
The function invokes the user-defined function at runtime, which is defined in x/xxxxcustom.p and returns the value returned by the function. It runs the function in a different persistent procedure (x/xxxxpcustom.p).The input to f-dynafunc is a singlestring with function name and its parameters delimited by ASCII character 01H. It accepts up-to 6 parameters.
ReturnType : ReturnType of the function invoked
AppliesTo : Customer Function
Used as:
f-dynafunc (“f-add” + chr (1) + “8” + chr (1) + “4”) returns “12”.
f-add should be declared in x/xxxxpcustom. It should take 2 parameters.
Input Parameter
Parameters | Data Type | Description |
---|---|---|
p-param | Character | Comma separated list, first is function, rest are parameters for this function |
f-xmlacdef
The function returns the default language defined in Javra IDE system defaults.
ReturnType : Character
AppliesTo : Data
Used as:
This function is used as f-xmlacdef().
f-xmlac
The function returns a character value. It is used to get default language of the logged in user. It returns language of user from the table ‘xuser’.
ReturnType : Character
AppliesTo : Data
Used as
This function is used as f-xmlac().
f-replfunction
This function evaluates the function and replaces function with a value. If we are passing function as an input parameter in function then ‘f-can-do’ treats function as character list and use ‘f-replfunction’ to get value from the function.
ReturnType : Return Type of function used in parameter
AppliesTo : Functions
Used as:
If input parameter v-allfunction is like f-xlevc(‘[tablename]’) then using replace function to input parameter are:
f-replfunction(f-xlevc(‘[inpureq]’), true).
Output :
‘1’.
Input Parameters
Parameters | Data Type | Description |
---|---|---|
v-allfunction | Character | Function list |
v-quoter | Logical | If set to true then converts the specified value to character and enclose the results with the quote when necessary. |
f-xdepc
This function returns a character value. It returns the current department of current logged in user. In X/E, departments are defined in X/E Admin>Departments.
ReturnType : Character
AppliesTo : Data
Used as:
The function is used as f-xdepc().
f-xlevc
This function returns the company level of either default, shared, or non-shared for the file (tablename). The file is either shared or non-shared. As per the file and the department hold shared, non-shared and default level. Depending on the file and the department of the user, the f-xlevc returns the company level.
ReturnType : Character
AppliesTo : Data
Used as:
f-xlevc(‘v-xlevc’).
Input Parameter
Parameters | Data Type | Description |
---|---|---|
v-xlevc | Character | Table name |
f-xlevc-xdepc
This function returns a character value.
Description
Inputs are the name of the file and the department, the level code for this file for this specific department is returned.
ReturnType : Character
AppliesTo : Data
Used as:
The function is used as f-xlevc-xdepc(‘inpureq’, f-xdepc()).
Input Parameters
Parameters | Data Type | Description |
---|---|---|
v-xfilc | Character | Table Name |
v-xdepc | Character | Department |
f-xusec
It returns the user ID (xusec) of the currently logged on user and this function is used as
ReturnType : Character
AppliesTo : Data
Use as:
This function is used as f-xusec().
f-disptime
It returns the current time in format ‘HH:MM:SS’ and it is used as
ReturnType : Character
AppliesTo : Data
Use as:
This function is used as f-disptime().
f-xpven
It returns version number of required program. It retrieves from the ‘xpve.xvern’.
ReturnType : Integer
AppliesTo : Program
Used as:
The function is used as f-xpven(‘xprog-xproc’).
Input Parameters
Parameters | Data Type | Description |
---|---|---|
p-xproc | Character | Program name |
f-xpvencurrent
It returns true if it is the current working version.
ReturnType : Logical
AppliesTo : Program
Used as:
The function is used as f-xpvencurrent(xpven).
Input Parameters
Parameters | Data Type | Description |
---|---|---|
Xpven | Integer | Version number of program |
f-xvern
It returns the current version on the basis of currently logged in user and retrieves value from the field .
ReturnType : logical
AppliesTo : Data
‘xses.xvern’.
Used as:
It is used as f-xvern().
Input Parameter
None.
f-xcusn
It returns the correct customer number from table ‘xcustomer’.
ReturnType : Integer
AppliesTo : Data
Used as:
This is used as f-xcusn().
Input Parameter
None.
f-primkey
It returns string with total key of external table. The function is used to fill a non-unique key field with a unique code of the primary key. This is done by collecting all the codes of the primary index of the external tables and put them in a string.
ReturnType : Character
AppliesTo : Data
Used as:
It is used as f-primkey().
Input Parameter
Parameters | Data Type | Description |
---|---|---|
v-xfilc | Character | Table Name |
v-parent | Character | Parent program |
f-delete
The function either physically deletes the row from the database or sets the status (xstac) of the record to a deleted status.
ReturnType : Character
AppliesTo : Data
Used as:
f-delete(input “xbline”,input rowid(xbline), output p-delerrorcode, p-delerrordesc).
Input Parameter
Parameters | Data Type | Description |
---|---|---|
p-delfile | Character | Name of the file (table name) to delete |
p-delrowid | Rowid | Rowid of the record to delete |
Output Parameter
Parameters | Data Type | Description |
---|---|---|
p-errcode | Character | Error code |
p-errdesc | Character | Extra information (filename) if record not deleted |
f-validusertypes
It returns all the valid keys of a type table for the current user.
ReturnType : Character
AppliesTo : Data
Used as:
It is used as f-validusertypes().
Input Parameter
Parameters | Data Type | Description |
---|---|---|
p-file | Character | Name of the file with usergroup for a type table |
p-field | Character | Name of the keyfield of the type table |
f-xdlang
The function returns the translation of a field if available else returns the normal.
ReturnType : Character
AppliesTo : Data
Used as:
assign v-value = f-xdlang(input w-buffer, /* file handle where it is about */
input entry(2,v-mfield,’.’), /* field to be translated */
input f-xmlac()) no-error.
Input Parameter
Parameters | Data Type | Description |
---|---|---|
p-filehdl | Handle | Handle of the file where it is |
p-field | Character | Field to be translated |
p-xmlac | Character | Language to display |
f-xlabel
This function returns a label as well as tooltip from a field in thexlabeltable. If it is not avail then it gets from the dictionary (column-label).
ReturnType : Logical
AppliesTo : Data
Used as:
f-xlabel (input p-xproc, input p-xfilc, input p-xwidc, input p-xmlac, input true, output lab, output v-tool).
Input Parameter
Parameters | Data Type | Description |
---|---|---|
p-xproc | Character | Program name |
p-xfilc | Character | Table name |
p-xwidc | Character | Field |
p-xmlac | Character | Requested Languages |
p-label | Log | True-Normal labelFalse-Column-label |
Output Parameters
Parameters | Data Type | Description |
---|---|---|
p-labeltxt | Character | Requested label |
p-tooltxt | Character | Requested tooltip |
p-xwidc | Character | Field |
p-xmlac | Character | Requested language |
p-label | Character | Normal label else column-label |
f-xedbname
The Function returns X/E database name and this function is used as f-xdebname().
ReturnType : Character
AppliesTo : Data
Used as
f-xedbname()
f-e-imagepath
This function returns the imagepath with server-path stripped.
ReturnType : Character
AppliesTo : Data
Used as:
If System Defaultsà Webserver contains: “c:\inetpub\wwwroot” and System Defaults HTML dir contains: “/htmldir/”
f-e-imagepath (‘c:\inetpub\wwwroot\dir\images’) returns’dir\images’.
f-e-imagepath (‘htmldir/images/a’) returns ‘images/a’
Input Parameters:
Parameters | Data Type | Description |
---|---|---|
p-path | Character | Path |
f-xe-toxml
When creating XML files sometimes there are fields (elements/attributes) where we need to use special characters like space, &, < etc. However, according to the XML specification, these are invalid. This function encodes and decodes the special characters and convert them to valid XML values. It is the complete version as it indents, use node-attribute and line break properties ASCII characters 01H, 02H, and 03H are returned as ,  and .
ReturnType : Character
AppliesTo : Data
Used as:
f-xe-toxml (“string”) returns “string”.
f-xe-toxml (“string & sentence”) returns “string & sentence”.
f-xe-toxml (‘string&>’ + chr (10) + ‘test’).
Output:
string>test
Input Parameters
Parameters | Data Type | Description |
---|---|---|
v-toxml | Character | String to be replaced |
f-xe-toxml-light
This function replaces all the characters, which give problem in an XML call simple version. It does not perform the task such as indentation, line break, and it does not handle the more special characters as function f-xe-toxml does.
ReturnType : Character
AppliesTo : Data
Used as:
f-xe-toxml (‘string>’ + chr (10\) + ‘test’).
Output:
string>
test
Input Parameters
Parameters | Data Type | Description |
---|---|---|
v-toxml | Character | String to be replaced |
f-index
This function returns an index value.
ReturnType : Character
AppliesTo : Data
Input Parameter
Parameters | Data Type | Description |
---|---|---|
p-index | Character | Index value to return |
Used as:
v-index = f-index(p-index).
f-imagelist
This function returns Com-Handle. It returns Handle to ImageList ActiveX Control. This control contains all the images used in X/E toolbar buttons.
ReturnType : Handle
AppliesTo : Data
Used as:
v-imagelist = f-imagelist().