When you add or create databases in your App, Global variables are automatically added:
Current Record Index:
Each database will have a variable for the current selected record, which is set after using Database Lookup, Search/Update, Insert, Copy, Next, Previous, First, Last, or Delete Record database cards.
Format: DB_DatabaseName_CURRENT_RECORD_INDEX
Total Records:
Each database will have a variable for the total number of records.
Format: DB_DatabaseName_TOTAL_RECORDS
Database Fields:
Each database field will have a global variable, and whenever the current record index for a database is changed, each database field will contain the value for that record. If a database lookup fails because the requested record is not found, the database fields will be blank.
Format: DB_DatabaseName_FieldName