Preloaded Data JavaScript Example

Each preload rule requires JavaScript code to identify which criteria is used to preload a table. JavaScript can be used to define complex arguments, but do require a knowledge of JavaScript to produce. iEnterprises can create custom preload scripts for you.

JavaScript customization is not considered to be part of the core iEnterprise Mobile™ product and is not included in the standard support agreement. iEnterprises cannot provide support to fix code that has been created by anyone other than iEnterprises.


An example of some simple code used to filter data based on a Keyword is as follows:
<html><head><title>iEnterprise Mobile Sample Table Filter</title><script type="text/javascript">
function conditionQuery(){return "12.CUSTKW01 == Sales Inventory";}
</script></head> <body></Body></html>


In the example shown, the argument used to select preloaded data is "12.CUSTKW01 == Sales Inventory".
This can be dissected into the following parts:

  • 12: This is the MODULEID number of the module that is being checked for a specific value, in the example here the Product module had the MODULEID 12. The MODULEID is displayed within the module settings menu of iEnterprise Mobile. It is the ID number directly next to the sort order.
  • CUSTKW01: This is the field being used to preload code. In the example here a keyword field is being used to filter results. The Server Field Name is used. To find out the Server Field name, view the field in Map Settings for its module. For more information, see Displaying Fields Mapped Within Modules.
  • Sales Inventory: This is the value we are preloading. In the example shown, records should be displayed in a table if the CUSTKW01 within the Product module contains the value "Sales Inventory".