| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > FileManager > FileManager Methods >====== GetComponents (return the number of key components) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[fetch get a specific record by key value .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[geteof return end of file status .htm|{{btn_next_n.gif|Next page}}]] | | || **GetComponents( **//key //**)** {{blk2blue.jpg|blk2blue.jpg}} | **GetComponents** | Returns the number of components in the specified key. | | //key// | The label of the KEY. | The **GetComponents **method returns the number of components in the specified key. **Return Data Type:**     BYTE **Example:** ** PROGRAM** ** INCLUDE('ABFILE.INC')             !declare FileManager** ** MAP                               !program map** ** END** **GlobalErrors ErrorClass            !declare GlobalErrors objec** **Access:Order CLASS(FileManager)    !derive Access:Order object** **        END** **I       BYTE** **Order     FILE,DRIVER('TOPSPEED'),PRE(ORD),THREAD    !declare order file** **IDKey      KEY(Ord:Cust,Ord:ID,Ord:Date),NOCASE,OPT,PRIMARY** **Record     RECORD,PRE()** **Cust       LONG** **ID        LONG** **Date       LONG** **       . .** **KeyQueue  QUEUE,PRE(KeyQ)          !a list of key components** **Field     ANY                      !component field reference** **FieldName   STRING(12)             !component field name** **      END** ** CODE** ** !program code** ** LOOP Access:Order.GetComponents( ORD:IDKey ) TIMES !step thru key components** **  I += 1                           !increment counter** **  KeyQ.Field    = Access:Order.GetField(ORD:IDKey,I)!get component reference** **  KeyQ.FieldName  = Access:Order.GetFieldName(ORD:IDKey,I)!get component name** ** END**