Xephr® Functions

User defined functions can also be set up.  See User Javascript Functions.

If you are looking for functions for Pocket Xephr, see the Pocket Xephr information.

doInit()

For internal use only.

AddGlobalToUser(UUID, 'global name', 'global value')

Add a global to a user.  You must know the internal ID for the user in order to use this function.  

AddRoleToUser(UUID, 'role')

Add a role to a user.  You must know the internal ID for the user in order to use this function.

BuildRequestXml

For internal use only.

CallFunction(functioncall);

For information on calling functions, see the Database Function Calls section.

CallProcedure(precedurecall);

For information on calling procedures, see the Database Procedure Calls section.

ChangeDatasource()

For internal use only.

ChangeFieldLeft()

For internal use only.

ChangeFieldTop()

For internal use only.

ChangeOrderBy('block.field')

Change the sort order for this block to sort by the field referenced here.  The order by will be inserted into the order by clause for the block as the first entry by which to sort the returned records.

ChangeOrderByAsc('block.field')

Change the sort order for this block to sort by the field referenced here in ascending order.  The order by will be inserted into the order by clause for the block as the first entry by which to sort the returned records.

ChangeOrderByDesc('block.field')

Change the sort order for this block to sort by the field referenced here in descending order.  The order by will be inserted into the order by clause for the block as the first entry by which to sort the returned records.

CheckForMaxInput()

For internal use only.

ClearCookie( name);

Clear the value of the cookie.

ClearDropDownSelection('field')

Clear the value of the selected option list so that nothing is selected.

ClearForm();

Clears all values in the currently selected block and marks the block as not modified.

click( e)

For internal use only.

Delete();

Delete the current record on a form.

DeleteThisRow();

Delete the current record on a list or editable list.

DisableSaveForBlock();

Set the update flag on the current row to N, which prevents them from being saved to the database.  This function only affects the current row, which makes it ideal for use on editable lists with new rows.  

DisableUpdateFlags();

Set all update flags on the block to N which will prevent them from being saved to the database.  If the block has multiple rows, the update flags for all rows will be set to N.

DoListUpdate('form');

For internal use only.

DoLogin();

Log into the Xephr® Runtime.  This function is used in the On Mouse Click property for the login entity.

DoLogout(action);

Logs the user out of the runtime, destroying the session and authentication state.  Any cookies written to the client are explicitly destroyed.  If no action defined, the login screen is displayed.  Actions can be other Xephr entities or links to URLs, i.e. DoLogout('LOGIN'); or DoLogout('http://www.ndsapps.com/');

DoRecordToXML();

For internal use only.

EditThisRow('entity');

On an editable list, open the entity in Edit mode for the current record.   The entity is optional, and does not need to be entered if you are going to edit mode for the current screen.

EnableSaveForBlock();

Set the update flag on the current row to Y, which will mark them to be saved to the database.  This function only affects the current row, which makes it ideal for use on editable lists with new rows.  

EnableUpdateFlags();

Set the update flags for this block to Y, which will mark all fields on this block to be saved to the database.  If the block has multiple rows, the update flags for all rows will be set to Y.

EnforceLov();

For internal use only.

ExecuteQbe('entity');

Query the database for rows that match the query information entered on this entity.  The entity will be displayed in list mode with the matching rows.  The entity parameter is optional.  If an entity name is entered, the query will be performed against the list mode on the defined entity.  If no entity name is entered, the query will be performed against the current entity.

ExecuteQbeInNewWindow('entity');

Query the database for rows that match the query information entered on this entity.  The entity will be displayed in a new window in list mode with the matching rows.  The entity parameter is optional.  If an entity name is entered, the query will be performed against the list mode on the defined entity.  If no entity name is entered, the query will be performed against the current entity.

ExecuteQbeInternal()

For internal use only.

ExecuteReport('entity');

Query the database for rows that match the query information entered on this parameter form.  A report will be generated with the matching rows. The entity parameter is optional.  If an entity name is entered, the query will be performed against the defined entity.  If no entity name is entered, the query will be performed against the current entity.

ExecuteReportInNewWindow('entity');

Query the database for rows that match the query information entered on this parameter form.  A report will be generated with the matching rows and will be opened in a new window. The entity parameter is optional.  If an entity name is entered, the query will be performed against the defined entity.  If no entity name is entered, the query will be performed against the current entity.

ExecuteReportInternal()

For internal use only.

ExecuteShow();

For internal use only.

ExecuteShowInParent();

For internal use only.

expandDragDrop()

For internal use only.

extractBriefMessage()

For internal use only.

FieldIsLowerCase();

For internal use only.

FieldIsUpperCase();

For internal use only.

finalizeContainer()

For internal use only.

GetColumnValue('field');

On an editable list, get the value in the defined field.

GetCookie( name, default value);

Get the value of the cookie.  If the cookie is not set, return the default value.

GetCSOSelection()

For internal use only.

GetCurrentUser()

Retrieve the internal ID for the currently logged in user.

GetCurrentUsername()

Retrieve the user name for the currently logged in user.

GetFOFileCode('field')

Retrieves Server File Name from the specified field in the current block.  For use with the Upload File Fields.

GetFOFileName('field')

Retrieves User File Name from the specified field in the current block.  For use with the Upload File Fields.

GetFunctionMessage();

For internal use only.

GetGlobalValue('name');

Get the value stored in the global variable defined here.

GetQualifiedName();

For internal use only.

GetRealColumn('field');

For internal use only.

GetScreenWidth()

For internal use only.

GetScreenHeight()

For internal use only.

GetUUID()

For internal use only.

HasColumnChanged('field');

Determine if the value in the field defined here has been changed.  This function returns true or false.

HasRowChanged();

Determine if any values in the current row have been changed.  This function returns true or false.

Insert();

Insert the data entered on the screen into the database as a new record.  Insert is generally used on New screens.

IsCookieSet( name);

Check to see if the cookie has been set.

IsError();

For internal use only.

IsIteration();

For internal use only.

IsJavaException();

For internal use only.

IsPageSavable();

Boolean function that checks all blocks on the screen to see if it is savable.  For example, if any of the rows or columns have been changed.  

IsPageSavableExcept($$+BLOCK.FIELD$$)

Boolean function that checks all blocks on the screen except for the one defined in the parentheses to see if it is savable.  When defining the block.field, any field on the desired block can be entered and the whole block will be excepted from the check.  This is handy if you have a non-database block on a screen that has enterable fields and you do not want an action (such as a save)to occur if a change is made in that block, but you do want the action to occur if changes are made in other blocks on the screen.

IsRowNew();

Determine if the current row is a new row.  This function returns true or false.

Redirect()

For internal use only.

Refresh();

Refresh the screen.

RefreshParent();

Used on pop-up screens, this will refresh the entity from which this entity was generated.

ReloadStyles();

Causes the Xephr server to discard all currently cached styles and to reload them for the connected repository only.  This will also trigger a reload of Link Styles as well.

Use of this function does provide a potential for Denial of Service attack against the Xephr server as follows: while ( true ) { ReloadStyles(); } // do not use!

The above code (or similar) will cause the Xephr Server to constantly drop the Style/Link Style caches and is likely that the Xephr server may not be able to deliver pages correctly.

RemoveGlobalValue('name');

Remove the value stored in the defined global variable.

ResetRow();

Resets to the form to initial defaults and marks the block as not modified.

ReturnValueToParent('value');

Return the defined value to the parent.  This function is used when values are obtained from other entities.

RowExists();

Determine if the current row exists in the database.  Used on editable list entities when there are new rows defined.

Save();

Save the changes to the database.  Update existing database rows and insert any new rows.

Save(NO_SUCCESS_DIALOG);

Save the changes to the database.  Update existing database rows and insert any new rows.  Do not display the 'Update Successful' pop-up message if the save has no errors.

SelectHTTP()

For internal use only.

SelectSSL()

For internal use only.

SequenceInsert('block.field','sequence');

Obtain the next value from the defined sequence, enter that value into the defined field, and then insert the data entered on the screen into the database as a new record.

SetAllValues( 'block', 'field', 'value');

Set the value in the defined field on the defined block to the specified value.  This is primarily useful for editable lists, as it will set ALL of the fields by that name for ALL of the rows returned to the same value.  For Checkbox fields, to set the checkbox, use Y, to reset it use N.  For other fields, just use the text you want to use.

SetColumnTo('field','value');

Set the value of the defined field in the current block to the defined value.

SetCookie( name, value, number of hours, domain);

Set the cookie to this value.  The domain and number of hours parameters are options.  The domain is the domain to make the cookie visible to.  If it's not provided, domain is restricted to the current domain.  The number of hours is the number of hours for which the cookie is valid.  You can also use one of the following constants for the number of hours parameters:

SetFocus(field);

Put the cursor in the defined field.  The field definition is the field in the current block, no quotes.  If you do not enter a field, the focus will be placed in the field that has the Request Focus property set to true on this block.

SetGlobalValue('name','value');

Set the value for the named global variable to the defined value.  See the Global Variables and Values section for more information.

SetParameters('target block.field','value');

Set the target field on the target block to the defined value.  For more information, see the Passing Value Between Entities section.

SetReturnedValue();

For internal use only.

Show('entity','block.field','value');

Open the defined entity in its default mode, carrying the defined values to the defined field on the defined block.  For more information, see the Passing Value Between Entities section.

ShowCalendar();

For internal use only.

ShowEdit('entity','block.field','value');

Open the defined entity in edit mode, carrying the defined values to the defined field on the defined block.  For more information, see the Passing Value Between Entities section.

ShowEditInParent('entity','block.field','value');

Used on pop-up screens, open the defined entity in edit mode in the window from which this screen was generated, carrying the defined values to the defined field on the defined block.  For more information, see the Passing Value Between Entities section.

showErrorWindow()

For internal use only.

ShowInParent('entity');

Used on pop-up screens, show the defined entity in the window from which this screen was generated.  For more information, see the Passing Value Between Entities section.

ShowInWindow('entity', 'mode', 'height', 'width', 'top', 'left');

Show the defined entity in the defined mode.  The height, width, top, and left values define the size of the new entity.  For more information, see the Passing Value Between Entities section.

ShowList('entity','block.field','value');

Open the defined entity in list mode, carrying the defined values to the defined field on the defined block.   For more information, see the Passing Value Between Entities section.

ShowListInParent('entity','block.field','value');

Used on pop-up screens, open the defined entity in list mode in the window from which this screen was generated, carrying the defined values to the defined field on the defined block.   For more information, see the Passing Value Between Entities section.

ShowLov();

For internal use only.

ShowNew('entity','block.field','value');

Open the defined entity in new mode, carrying the defined values to the defined field on the defined block.   For more information, see the Passing Value Between Entities section.

ShowNewInParent('entity','block.field','value');

Used on pop-up screens, open the defined entity in new mode in the window from which this screen was generated, carrying the defined values to the defined field on the defined block.   For more information, see the Passing Value Between Entities section.

ShowParameterForm('report','block.field','value');

Run the defined report, opening the parameter form first, carrying the defined values to the defined field on the defined block.  For more information, see the Passing Value Between Entities section.  

ShowParameterFormInParent('report','block.field','value');

Used on pop-up screens, run the defined report, opening the parameter form first in the window from which this screen was generated, carrying the defined values to the defined field on the defined block.  For more information, see the Passing Value Between Entities section.  

ShowProcessUpload( 'block', 'entity')

For internal use only.

ShowQBE('entity','block.field','value');

Open the defined entity in QBE mode, carrying the defined values to the defined field on the defined block.   For more information, see the Passing Value Between Entities section.

ShowQBEInParent('entity','block.field','value');

Used on pop-up screens, open the defined entity in QBE mode in the window from which this screen was generated, carrying the defined values to the defined field on the defined block.   For more information, see the Passing Value Between Entities section.

ShowReport('report', 'block.field','value');

Run the defined report without displaying the parameter form, carrying the defined values to the defined field on the defined block.  For more information, see the Passing Value Between Entities section.

ShowReportInParent('report', 'block.field','value');

Used on pop-up screens, run the defined report without displaying the parameter form in the window from which this screen was generated, carrying the defined values to the defined field on the defined block.  For more information, see the Passing Value Between Entities section.

ShowUploadDialog( 'block', 'field', 'row number', 'auto save', 'target')

For internal use only.

TriggerSync();

Triggers a database/file sync on the currently connected server.

VerifyDataSaved()

For internal use only.

Xephr is a registered trademark of NDS Systems, LC.

Copyright © 2007 NDS Systems LC.