ルックアップ自体の値を変更する方法が見つからなかったので、ルックアップが変更されるたびに更新される静的フィールドを横に置きました。これが私がそれをやった方法です:
表 A の表示方法:
display [datatype] lookupName(tableA _tableA)
{
;
return tableB::find(_tableA.[tableA id column]).[tableB string column];
}
テーブル B の検索方法:
static tableB find([datatype] [lookup variable], boolean _forUpdate = false,
ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
{
[TableB] [tableB];
if ([lookup variable])
{
if (_forUpdate)
{
tableB.selectForUpdate(_forUpdate);
if (_concurrencyModel != ConcurrencyModel::Auto)
{
tableB.concurrencyModel(_concurrencyModel);
}
}
select firstonly tableB
where tableB.[lookup column] == [lookup variable];
}
return tableB;
}
テーブル A と B の両方をフォームのデータソースとして追加しました。
フォームに文字列フィールドを追加しました。
テーブル A をフィールドの DataSource として設定し、lookupName を DataMethod として設定します。
ルックアップ フィールドに変更されたメソッドを追加して、静的フィールドを更新します。
element.redraw();
これが誰かに役立つことを願っています。