Tuesday, 13 December 2011

Custom Property set lookups from databases

[Inforouter] When using a Database lookup with an Inforouter custom property set field, the custom property set field names which are to be filled from the database must have the same names as ther database fields, or an alias must be used to return data with a matching name, or if the same look up is required to populate two separate custom property fields.

With alias - will populate custom property field "TESTNAME" with data from Supplier_Name field in database. (example to populate a list box)

Select Supplier_Name "TESTNAME" from ATT_TradeSuppliers order by supplier_name


Without alias - will populate custom property field "Supplier_name" with data from Supplier_Name field in database.

Select Supplier_Name from ATT_TradeSuppliers order by supplier_name


An example to use an entered value to return the resutls of a search, into the Employee_num, department, and surname custom property fields based upon the forname entered into the forname custom property field.

SELECT Employee_num , department, surname, forname from Employees WHERE forname like '<%=VALUE%>%'

(PCA - with thanks to JN)