active_field

Sets the active field of a window.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X      

Syntax

int active_field([field])
int               field

Description

Always returns the new active field, which has been stored in the window-name.AF variable.

field (optional) specifies a new active field by its count. If field's value exceeds the window's field count, the function assumes the field with the highest value. If you don't give a value for field, the function returns the existing (current) active field.

Notes

Use active_field() when you want an active field if the current window. Use window-name.AF, where window-name is the name of the window, when you need the active field of a specific window.

Example

Useful in the [TAB] trigger.
{
if (active_field() == active_field(active_field()+1))
  active_field(0);
}