Use this type of restriction when you wish to apply a restriction to a particular validated table in a view. This example shows how to restrict Building Code foreign key values to entries that start with HQ or JFK.
<restriction
type="forValidatedTables"
sql="#ASQL_VPAField() LIKE 'HQ%' OR #ASQL_VPAField() LIKE 'JFK%' ">
<title translatable="true">Validated Tables Restriction
on bl</title>
<validatingTable name="bl"/>
</restriction>
Note: If you want retrict the employee field against the BL table and you are not using Emergency Preparedness application, remove the Validating Table reference between the Contingency Building Code (em.contingency_bl_id) and the Buildings table. Otherwise, before the Employee record displays, the standard restriction will require that an employee is in both places -- an unlikely condition.
If you are using the Emergency Preparedness application, use an SQL VPA restriction instead to get the restriction you intend (typically between the em.bl_id field and not the em.contingency_bl_id field).
Copyright © 1984-2014, ARCHIBUS, Inc. All rights reserved. |