Find Fieild No

To find the fieldno of a particular field we can use Record.FIELDNO(Field) Syntax. Eg. Message(Customer.FIELDNO(Name)); Its working fine. I have created a text variable called FieldName. then FieldName := ‘Name’; Then used this variable to get the fieldno of the field customer.name as follows Message(Customer.FIELDNO(FieldName)); Its given an ERROR !!! Is it not possible to use variables for fields ??? Thanks Edited by - joseph_mathew on 2001 Mar 20 11:28:40

No, you need to pass the field as argument to the FIELDNO function. Best regards, Soren Nielsen, moderator Navision Online User Group

You could write a function to return the field number for a specified table and field from the Field table (2000000041).

OK. We will get Fieldno from Table (2000000041). Suppose if I want to know the table relationship of a field. Fo that purpose, what I am doing is to use the function “Record.RELATION(Field)”. In this case also we can’t use Variable for ‘field’ as I mentions on 1st posting. Is there any other way to get the table relationship of a field. Thanks Joseph