When used for a component parameter, the following objects are of special interest:
Object | Value |
---|---|
config | The Interface configuration object of the component. |
mc | The MetamergeConfig object of the Config instance (config.getMetamergeConfig()). |
work | The Work entry of the AssemblyLine. |
task | The AssemblyLine object. |
select * from {config.jdbcTable}This will take the Table Name parameter and create the following SQL Select statement:
select * from AccountsOr you could get more advanced, and try something like this for the SQL Select parameter:
SELECT {JavaScript<<EOF var str = new Array(); str[0] = "A"; str[1] = "B"; return str.join(","); EOF } FROM {property:mystore.tablename} WHERE A = '{work.uniqueID}'The embedded JavaScript will return the value “A,B” which is then used to complete the rest of the Expression. If we have a Property Store called mystore with a tablename property set to “Accounts”, and a uniqueID Attribute in the Work entry with the value “42”, the final result will be:
SELECT A,B FROM Accounts WHERE A = '42'This evaluated result is not displayed in the CE. Simply entering curly braces will not cause Expression evaluation to be done for the parameter value. Instead, we have two choices when tying Expressions to parameters:
@SUBSTITUTEhttp://{property.myProperties:HTTP.Host}/
This last method of entering expressions directly is not recommended; use the Expression editor instead.
Parent topic: Expressions