JavaScript CookBook/Overview List/Using interpolation parameters

From GeoMedia Smart Client
Jump to: navigation, search

Using interpolation parameters in Overview Lists

Problem: You want to call a custom javascript function in your overview list row action. The function requires the current row value of a certain form field.

Solution: You can use the {ROW.FIELD_ID} syntax to interpolate the value of a given field in the current row. The following example alerts the value of the Guid field for the current form row:

<Form name="DbTestFilterFields" table="AGENCY_DGROUP" idfield="Guid" >
    <FormTab name="Tab">
      <FormGroup name="Group">
        <FormField name="Guid" datatype="guidstring" visible="list" />
<FormAction name="ActionTest" label="Alert Row" action="SCRIPT[alert('ROW Guid' + {ROW.Guid})]" visible="list" type="row"  />

Note: Don't put the {ROW.FIELD_ID} parameter under quotation marks - like "{ROW.FIELD_ID}" - this will prevent the interpolation. The GMSC middleware will add the quotation marks during the interpolation if necessary.

Other Recipes in this category: