Using Tokens

 

Expand/Collapse all Show/Hide All

Each token name used by eBusiness Manager has a format of "table name + . + column name". For more information, see File Layouts and Program Information. For example:

~~AR_Customer.CustomerName$~~

Refer to the following sections for information about how to add tokens to your Web page.

Expand or collapse item  Adding Columns from Tables to Templates

For each template included in your eBusiness Manager installation, specific files are accessed as part of the page-rendering process. You can add any column from these tables, including user-defined fields (UDFs) that were added to the tables. In addition, if the Include Customizations check box is selected in Template Maintenance for the template, you can add columns from additional tables.

Some templates contain dynamically filled tables. For example, the items listed on the products and services page are contained in a dynamically filled table. In a dynamically filled table, the actual record being displayed is available only when the row is being built. Dynamically filled tables are preceded with a special token that includes ?t. For example:

<tr><td>~~IW_InquirySOOpen.m4p;SO_INQ_TABLE?t~~</td></tr>

As with other templates, you can add columns from additional tables to templates with dynamically filled tables. The dynamically filled portion is a single row. If you would like to have multiple dynamically filled rows, you can use the ~~%TemplateSvc'RowBreak$~~ token to insert a closing table row tag, then a beginning row tag.

See Available Tables for Templates for a list of all templates and the tables available to you for customization for each template.

 

Expand or collapse item  Accessing Column Listings for Tables

For a listing of columns available for all tables, see File Layouts and Program Information . If there are user-defined fields (UDFs) defined in the Customizer module, you can print the UDF Maintenance Listing to view a list of all UDFs created for all tables. For more information, see UDF Maintenance Listing.

 

Expand or collapse item  Examples of Tokens

You can use tokens to format information displayed on the page.

Expand or collapse item  Displaying a formatted customer number with division number

The %TemplateSvc'CustomerNumber$ token displays the formatted division number plus the customer number assigned to the user; for example: 01-ABF.

Tokens that include ?x are expressions that are resolved as part of the replacement process. Examples of common expressions you may wish to use include the following:

Expand or collapse item  Adding two columns

Add two columns, displaying the result:  

~~(IT_ShoppingCartHeader.TaxableAmt + IT_ShoppingCartHeader.NonTaxableAmt)?x~~

 

Expand or collapse item  Using masks

To format the result of the operation in the example above, you can modify the above expression to include the mask:

~~STR(IT_ShoppingCartHeader.TaxableAmt + IT_ShoppingCartHeader.NonTaxableAmt:”###,##0.00-“)?x~~

The following mask settings are based upon your Sage 100 Standard host option settings and are available for use.

%TemplateSvc'eBMQuantityMask$

%TemplateSvc'eBMPriceMask$

%TemplateSvc'IMQuantityMask$

%TemplateSvc'IMPriceMask$

%TemplateSvc'ExtensionAmtMask$

Using the extension amount mask, this expression then becomes:

~~STR(IT_ShoppingCartHeader.TaxableAmt + IT_ShoppingCartHeader.NonTaxableAmt: %TemplateSvc'ExtensionAmtMask$)?x~~

 

Expand or collapse item  Displaying a formatted date

Dates are stored in the database in the raw format of YYYYMMDD. To display a formatted date, use the following expression:

~~%SYS_SS'FormatDate$(SO_SalesOrderHeader.OrderDate$)?x~~

 

Expand or collapse item  Translating a code into a description

To translate a column that contains a 1 character code into a more descriptive display, use an expression similar to the following:

~~TBL(POS(SO_SalesOrderHeader.OrderStatus$="NOCH"), "", "New Order", "Open Order", "Closed Order", "On Hold")?x~~

Using this example an order with a status of O would display Open Order on the web page.

 

For more information, see Customizing Your Web Pages.


 

© Sage Group plc 2019. Privacy Policy | Copyright/Trademarks