Programatically iterate record fields

JaydkJaydk Member Posts: 28
Is it possible to programatically iterate the fields of a table ? lets take table 18, is to possible to write some sort of loop which write the field captions or names to a MESSAGE() ?

Comments

  • MBergerMBerger Member Posts: 413
    yes, look up RecordRef and FieldRef in the helpfile.
  • BeliasBelias Member Posts: 2,998
    "Field" table can be useful (and simpler, if your purpose is only to message out fieldcaptions).
    You can see the structure of this table creating a tabular form based on it with the wizard.
    (i use this table to loop each field of the table, without writing them all)
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • tompynationtompynation Member Posts: 398
    Field.SETRANGE(TableNo,18);
    Field.SETRANGE(Class,Field.Class::Normal);
    Field.SETFILTER(Type,'<>%1',Field.Type::BLOB);
    Field.SETRANGE(Enabled,TRUE);
    Field.FIND('-');
    REPEAT
    MESSAGE(FORMAT(Field.FieldName));
    UNTIL Field.NEXT = 0;
Sign In or Register to comment.