Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves the type of a delete action for a table.
Syntax
public int deleteActionType(int cnt)
Run On
Called
Parameters
- cnt
Type: int
The one-based index to the list of the delete actions for the table. The list is in AOT order.
Return Value
Type: int
An integer that represents the type of the delete action of the table that is specified by the cnt parameter. It can be one of the values in the following table.
0 |
None |
1 |
Cascade |
2 |
Restricted |
3 |
Cascade + Restricted |
Examples
The following example shows the retrieval of the type of delete actions for a table.
DictTable dt, dt2;
str strDelActType;
int i, nDelActType;
dt = new DictTable(tablenum(CustTable));
if (dt)
{
for (i=1; i <= dt.deleteActionCnt(); i++)
{
dt2 = new DictTable(dt.deleteActionTableId(i));
if (dt2)
{
nDelActType = dt.deleteActionType(i);
switch (nDelActType)
{
case 0:
strDelActType = "None";
break;
case 1:
strDelActType = "Cascade";
break;
case 2:
strDelActType = "Restricted";
break;
case 3:
strDelActType = "Cascade + Restricted";
break;
}
print strfmt("Delete action table: %1 Type: %2",
dt2.name(),
strDelActType);
}
}
}