Академический Документы
Профессиональный Документы
Культура Документы
1. In the AOT, create a new form named BudgetModelLookup. Set its design properties
as follows:
Property Value
Frame Border
WindowType Popup
2. Add a new Tree control to the design, with the following properties:
Property Value
Name ModelTree
7. In the AOT, open the BudgetModel table, and change its lookupBudgetModel()
method with the following code:
8. To see the results, open Budgeting | Common | Budget register entries. Start
creating a new entry by clicking on the Budget register entry button in the action
pane, and expand the Budget model lookup:
Look up Methods
Lookup() Method
Implement this code in the lookup() method of the field where you need the lookup to be displayed.
NS: The same code can be written in three places to achieve the lookup.
1) Under AOT->Table->Method and call this method from the form design where you want to display the
lookup.
2) Form->Datasource->Table->Field->method
3) Form->Design->Field->Method.
uerWordFieldMapping uerWordFieldMappingLocal;
SysTableLookup sysTableLookup;
Query query;
QueryBuildDataSource qbd;
// Instantiate sysTableLookup object using table which will provide the visible fields
sysTableLookup = SysTableLookup::newParameters(tablenum(uerWordMergeFieldList),this);
uerWordFieldMappingLocal = element.ParentFormValue();
qbd = query.addDataSource(tablenum(uerWordMergeFieldList));
qbd.addRange(fieldnum(uerWordMergeFieldList,TableName)).value(uerWordFieldMappingLocal.TableN
ame);
sysTableLookup.addLookupfield(fieldnum(uerWordMergeFieldList,uerWordMergeFieldName));
sysTableLookup.parmQuery(query);
//
sysTableLookup.performFormLookup();
SysTableLookup sysTableLookup ;
QueryBuildDataSource queryBuildDataSource;
sysTableLookup =
SysTableLookup::newParameters(tableNum(OMInternalOrganization),_formControl);
queryBuildDataSource = query.addDataSource(tableNum(OMInternalOrganization));
sysTableLookup.addLookupfield(fieldNum(OMInternalOrganization, Name));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();