How to Reference Field contents

I have a list of records: The contents of the fields on the records are to be grouped according to the fields nos. e.g content of fldnos: 2+1002+2002, 3+1003+2003, 4+1004+2004 e.t.c. should be used to form an Item no. How do I access the flds contents to make them form Item no which could be inserted on Job Journal.

Would it be possible for you to give a more detailed example to illustrate your question? Are all the fields described on each record (2,3,4,1002,1003,1004,2002,2003,2004? What do the source records represent? Can you provide an illustration including sample data and pseudocode? Dave Studebaker Liberty Grove Software A Navision Services Partner

I received the message you sent with the sample information. I am posting it here so other people with good ideas can offer assistance as well. I was not able to upload a copy of the graphic you sent. _________________________________________________ Table FLD 2-177 – product Init name FLD 1002-1177 – product Packing FLD 2002-2177 – product Brand Fld 2 :0 3 :1 4 :2 1002 :B 1003 :C 1004 :B 2002 :K 2003 :stuck_out_tongue: 2004 :stuck_out_tongue: Item name to be generated 2+1002+2002 :::0BK 3+1003+2003 :::1CP 4+1004+2004 :::2BP Form made to enter packing, brand and quatity, this update the inventory find attached object Navision W1 3.00 Thanks Dave Studebaker Liberty Grove Software A Navision Services Partner

I suspect I still do not understand the problem. But if all you need to do is build an Item number out of three fields, then all you need to do is to convert each of the fields to a text variable of the proper length, concatenate those working variables into an Item number field (Code, 20 long) and use it. Concatenation of text variables is done using the + operator, just like the syntax in your sample data. Now you can tell me what I didn’t understand about the problem. Dave Studebaker Liberty Grove Software A Navision Services Partner

Get the feeling the request is to select the first field, then get the Field No. of the field and use this no. to find the 2nd and 3rd fields. In other words, use the Field No. to build an index. The answer is: You can’t do that. Navision does not support referencing to fieldnames of the fieldno. with a variable. You have to specify the name at designtime. In most cases, this means building a huge CASE function. But do you really have a table defined with 3 * 177 = 531 fields? Why not split into different tables? Then you could use the value of the first field as a normal numeric value, and use setrange/setfilter to select the 2nd and 3rd fields from their respective table. John

Thanks, John idea is very close to what I wanted. Currently I have 177*3 = 531 fields in a table; I have never considered using multiple tables, but I will try that and see if it fits. I was actually avoiding using of Huge case function. I am currently working on a solution i.e. on validate of the fields A new table is updated with the field content and the field No. all values are formated to text. From The new table I have Catch No. Field No. Content CA000007 2 14 CA000007 3 34 CA000007 4 45 CA000007 5 24 CA000007 6 35 CA000007 7 44 CA000007 1002 0.50-KG CA000007 1003 0.80-KG CA000007 1004 1.00-KG CA000007 1005 2.00-KGS CA000007 1006 2.00-KGS CA000007 1007 7.50-KGS CA000007 2002 KRUS CA000007 2003 KRUS CA000007 2004 KRUS CA000007 2005 PR7S CA000007 2006 PR7S CA000007 2007 PR7S Fields in 1 to 177 stores the quantity Fields in 1002 to 1177 Pack Type Fields in 2002 to 2177 Brand From the above I am able to generate the Item nos by using filters. This is working fine for now. I will like to know if there are better solution. I want to avoid as much as possible hard coding. Adewale A. Abiola