Hi,
1. Create a table,
2. Use the 2 EDTs and make it one as index as unique by property AllowDuplicates : NO
3. Create a find method in the table using below code and patten
static TableName find(UsedEDT _UsedEDT ,
boolean _forUpdate = false,
ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
{
TableName tableName ;
if (_UsedEDT)
{
if (_forUpdate)
{
tableName .selectForUpdate (_forUpdate);
if (_concurrencyModel != ConcurrencyModel::Auto)
tableName .concurrencyModel(_concurrencyModel);
}
tableName .selectLocked (_forUpdate);
select firstonly tableName
index hint UsedEDTIndex
where tableName.UsedEDT == _UsedEDT ;
}
return tableName ;
}
/************************Using the find method **********************/
Using the display method with find() we can get that value by using below codes in the table.
display Name name()
{
return TableName::find(this.UsedEDT).name();
}
1. Create a table,
2. Use the 2 EDTs and make it one as index as unique by property AllowDuplicates : NO
3. Create a find method in the table using below code and patten
static TableName find(UsedEDT _UsedEDT ,
boolean _forUpdate = false,
ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
{
TableName tableName ;
if (_UsedEDT)
{
if (_forUpdate)
{
tableName .selectForUpdate (_forUpdate);
if (_concurrencyModel != ConcurrencyModel::Auto)
tableName .concurrencyModel(_concurrencyModel);
}
tableName .selectLocked (_forUpdate);
select firstonly tableName
index hint UsedEDTIndex
where tableName.UsedEDT == _UsedEDT ;
}
return tableName ;
}
/************************Using the find method **********************/
Using the display method with find() we can get that value by using below codes in the table.
display Name name()
{
return TableName::find(this.UsedEDT).name();
}