Field Index out of Range

I have a piece of code that sets a fieldref variable to the “Flushing Mehtod” field of the item card. My variables are as follows: R= RecordRef F = FieldRef DF = Record (a list of fields and their field numbers) So, in the example below, DF.“Field No.” = 5417 And the code is something like this: R.GETTABLE(Item); F := R.FIELDINDEX(DF.“Field No.”); This works on many of the fields in the Item table. However, when I try to do this on field 5417 (just as an example, there are others that don’t work) I get the following message: Field index ‘1215772’ out of range (must be within 1 through 235) Any help is appreciated.

Ok. Nevermind…I figured it out. I had to use R.FIELD(DF.“Field No.”) instead of FIELDINDEX.