Is there a way that I can use the field number to return the field name or caption of the associated field?
Thanks in advance
If you are talking about table fields(No./Name/Description/etc), then you could create a variable for table "Field". Then, it would be just a matter of filtering.
I'm getting the field number form the change log and the table from the change log. I want to uses these two values to give me the name or caption for that field
You won't find that table under the object designer. You need to create a new form using the wizard, lookup the tables and select it (Or type it directly). Run the form to investigate the structure of the table and the you can declare a Rec variable based on that table and use it.
The Field table is a virtual table. You won't find it in the table list in the object designer, but it can be selected as the source table for a form or the subtype of a record variable.
I have a code unit bases on the change log. For every record in the change log I need to get the field name in that record. I only have the table no and field no. So I uses this to lookup the name in the Fields table
rFields.SETFILTER(TableNo,'%1',rChangeLogEntry."Table No.");
rFields.SETFILTER(FieldName,'%1',rChangeLogEntry."Field No.");
IF rFields.FINDFIRST THEN
vFieldName := rFields.FieldName;
Is this part of your code? I don't see here a loop or a starting point for the rChangeLogEntry table.
I would expect :
IF rChangeLogEntry,FIND('-') THEN REPEAT
.
.Your code here..
.
.
UNTIL rChangeLogEntry.NEXT = 0;
However, if you have a loop for it or pass it as a parameter then I would add a breakpoint in your code to see the values of rChangeLogEntry in order to follow the filters applied in th feilds table...
Answers
Whats the full name of this table. Cant seem to find it in the table listing?
If you are talking about table fields(No./Name/Description/etc), then you could create a variable for table "Field". Then, it would be just a matter of filtering.
Dynamics NAV Enthusiast
I dont have that told on the sytem I'm working on
You won't find that table under the object designer. You need to create a new form using the wizard, lookup the tables and select it (Or type it directly). Run the form to investigate the structure of the table and the you can declare a Rec variable based on that table and use it.
RIS Plus, LLC
Ok. I have used this table but when I try and filter on it I dont get data. If I hard code the tableno as follows:
then I get data. But if I do it like this I dont get anything.
Any suggestions
I would expect :
However, if you have a loop for it or pass it as a parameter then I would add a breakpoint in your code to see the values of rChangeLogEntry in order to follow the filters applied in th feilds table...
so the data port loops through the Change log for entry written between a certain datatime stamp
OR
Most probably it's because rChangeLogEntry is initialized and doesn't follow the dataport record.
Thanks kapamarou
Just mark your post as solved...