-
finding the id of a field using the field name only by using the recref and fieldrefHi, hope the following can give you some hints.How to get the id, type, length and value of a field by its text name (field name)Thanks.ZHU
-
finding the id of a field using the field name only by using the recref and fieldrefIn an alternate approach, you can utilize the Field table to find the Field ID by setting a range on the Field Name... here's the example code..
var Fieldlist: Record Field; begin Fieldlist.SetFilter(FieldName, 'YourFieldName'); if (Fieldlist.FindSet()) then Message('Field No. is %1', Fieldlist."No.") end;
Additionally, you can specify the table name before the Field Name filter..Regards!
Helpful resources
Quick Links
Subscribe to
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
Leaderboard
Andre Arnaud de Cal... 283,183 Super User
Martin Dráb 222,733 Super User
nmaenpaa 101,138