Is it possible to define a field of a table as an array? I think not, but I’m just not 100% sure. I do not see the Dimensions property in the list of properties for a field though it is available for a variable (global/local). Pari Somasundaram
I don’t think it’s possible. The usual way is simply to create/use another table related to the table you are working on, with a link on the record ID. The comments table is a good example.
quote:
Originally posted by dgodbout
I don’t think it’s possible. The usual way is simply to create/use another table related to the table you are working on, with a link on the record ID. The comments table is a good example.
I do agree with your suggestion. I thought about it. I’m trying to solve a problem that I face (explained in my previous topic ‘complicated form design’). I would like to have multiple cost centers and their labor values on a single record for each salesline. If the cost centers and associated labor values can be stored in an array type field it will be easy to manipulate by placing any code in a FOR loop. There could be upto 20 cost centers. Pari Somasundaram
Is it important that the information is “shown” in a form or a report, or could it simply be attached to your sales lines by a table relation. In the second option, a function on a form could launch another form to show the detail, and an additionnal page of a report could do the job too.
You could add 20 fields and use “fieldref” to loop. Look for an example “recordref” from “emiel” on mibuso.com Don’t no if this applies to your problem but it is a way to emulate an array.
Hi Pari, the problem here is not one of a property, setting or code, it is one of a missing design. You need to design the system you are developing, rather than just programming it. Navision uses relational tables to store and organize data, arrays have nothing to do with records. Think in terms of crating a new table with a relation to hte first, and use this to store the required data. But please before you go any further, close Navision open a pad of paper, and design the solution on paper first. It will save you many hours of head banging in the future.
Thanks David. I do agree with you that it is important to normalize data; so using a sub-table to hold the details is the ideal way to do it. I suggested that we can provide a button which wll open another form with the cost center details of the salesline that the cursor is on. But it looks like the customer wants to see the cost center details of all saleslines in a group togthere on one form, with eachsalesline forming a record on the form. I will try Erik’s suggestion of Fieldref. I’m not sure if it will work. Thanks. Please let me know if any of you can think of a better solution. I will continue to work on it. Pari Somasundaram
I still think you should do it correctly (i.e. the Navision way), you are only going in a direction of having more and more problems to solve. If you want to implement a system that your client will be happy with, then design it correctly, and train them on how to use it.
Thanks David. I think you are right. We will need to convince the client to use the system with the right design. Pari somasundaram
Erik Are Fieldref and Recordref available only in Attain or are they available to use in Navision Financials too (version 2.60)? Pari Somasundaram
They are available starting from Navision Attain 3.60. -