mappedRowGet Method
Retrieve the value of a map field for a multi-row screen.
String HostScreen.mappedRowGet(String fieldName, int rowIndex); String HostScreen.mappedRowGet(int fieldIndex, int rowIndex); |
Arguments
HostScreen
Required. HostScreen object.
nameOrIndex
Required. The name or index of the map field. The name of a map field is case sensitive.
rowIndex
Required. The row index for the map field. The first map field would have an index of zero.
Remarks
The mappedRowGet method allows the value of a map field to be retrieved. Fields can be accessed by name, or by the index order in which they appear in the map. By setting the value of rowIndex, you can specify which row the map field appears on.
If the map field shows a value from a table list, then the first map field (rowIndex value of zero) would be the first item in the list. When the rowIndex is incremented by 1 then the map field would show the value for the next row.
If, for example, a map field has 3 detail lines then the rowIndex would have to be incremented by 3 for each detail row. In this case the first rowIndex would be 0 for the first detail item, 3 for the second detail item, and so on.
The following c# example illustrates the use of mappedRowGet and mappedRowSet by looping through 10 rows and setting the option for each row to the value the passed action if the invoiceNumber field defined for the row is equal to the passed parameter.
void SetInvoiceAction(HostScreen oScreen, string invoiceNumber, string action)
{
for(int i=0;i<10;i++)
{
if (oScreen.mappedRowGet("invoiceNumber", i)==invoiceNumber)
{
oScreen.mappedRowSet("action",i,action);
}
}
oScreen.putCommand("[enter]");
}
Requirements
Flynet Viewer
See Also
load | mappedGet | mappedSet | mappedRowSet | activeMapName
Applies To: HostScreen object
© 2016 Inventu Corporation, Flynet LTD