Returns the first record of an external file using the specified index and filtering data according to the Conditions declared in the where statements.
Xfor first <file_name> [Index <index_name>]
View Syntax conventions
Is the name of the Data View object defined to access the external file.
Defines the name of the index to be used.
Is the name of the Data View Index.
Clause that can be specified to establish a condition for data retrieval.
Any valid logical expression.
Specify the code to be executed when the first Xfor each does not filter any record.
Objects: Procedure, Transaction, Web Panel
This command is similar to the Xfor Each command, but it does not iterate (loop). It returns the first record (if there is one) of the external file using the specified index and filtering data according to the Conditions declared in the Where statements.
GeneXus will try to optimize the search in an intelligent way, taking into account the index specified in the Xfor Each group and the conditions established in the Where statement of the Xfor Eeach group.
Xfor Each command