10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table Field OperationsThis expression on the left side of the if statement:field(cust_table).currowWhichTableField Methodreturns the number of the array row that last had the input focus. Theexpression on the right side, because the specified cell field is the target field,returns the array row number of the row that gets the input focus next. If therow numbers returned by these two expressions are not the same, then theuser has moved the cursor up or down a row.WhichTableField, a method of the FormField class, indicates if a field is in atable field, and if so, which one.Because a single control button can manipulate the data in more than onetable field, it is important to be able to determine which table field is to bemanipulated. You can use the WhichTableField method to determine whether afield is in a table field and, if it is, to return the table field object to a variable.Using this method, you can access all the information about a specific tablefield, such as its name, column names, and data, without knowing atdevelopment time which field is to be accessed.The syntax for WhichTableField is:table_field_var = formfield.WhichTableField()This method returns one of the following values:• Null if the field is not in a table field• The table field in which the form field resides• The innermost table field if the field is in a nested table fieldWhen a control button is part of a table field and the user invokes one of itsmenu operations, OpenROAD uses the WhichTableField method to identify thetable field. The control button's script invokes the WhichTableField on theTriggerField. Because the control button's menu field triggers the event, andbecause the control button is directly associated with the table field,OpenROAD can identify the table field.However, if the control button is independent (not attached to a specific fieldor table field), you must write your own code to determine which fieldtriggered the control button invocation. If you are dealing with non-nestedtable fields, you can use FrameExec's InputFocusField attribute in conjunctionwith the WhichTableField method to determine the table field to be handled.Working with Arrays, Table Fields, and Collections 249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!