Set the value of a map field for a multi-row screen.
void HostScreen.mappedRowSet(int fieldIndex, int rowIndex, String value); void HostScreen.mappedRowSet(String fieldName, int rowIndex, String value); |
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.
Value
Required. The value to set the map field value to.
Remarks
The mappedRowSet method allows the value of a map field to be set. 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.
The first map field has a rowIndex with a value of zero. When the rowIndex is incremented by 1 then the next map field value could be set.
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
Inventu Viewer+
See Also
load | mappedGet | mappedSet | mappedRowGet | activeMapName
Applies To: HostScreen object
© 2022 Inventu Corporation