I have just begun in Navision programming and want to try and acheive something. I have two arrays with dimensions from [1][1] to [3][25].
One is text one is decimal. The text one I prepopulate from one table.
What I need to do is be able to return the index of a string in the text array and add in a number to the same index position on the decimal array. So if my table returns the values:
GUM 13.13
I can find that myarray has 'GUM' in position [2][12] and so I can add 13.13 to myOtherArray[2][12].
How is this done?
GMcB
0
Comments
I am not saying your solution is wrong, but is it not easier to create a temporary table?
You can have the 2 integers as primary key.
You can easily filter in the table and find you 'GUM' value.
And a temp. table does not have to be in your license
Hope this helps.
1. Create the desired table in the object designer
2. Define the table as variable in the globals or locals (whatever is desired)
3. Select properties on the variable en mark the temporary as yes.
4. Insert modify and delete as much as you want. The table exists only runtime.
5. If you leave the code, the object is destroyed automaticaly
Succes.
Otherwise you can create a for/do loop and compare your array
Or someting like that.
Yes, but how you will create this table, if you do not have it in license??? ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Navision C/AL is designed as customisation tool, not realy as a programming language I think