Hi,
I am building a sales line product configurator form and I want to have a tablebox which has source records from the item table, with an additional non-table bound column for the user to enter the quantity required. I have so far been able to bind the column to a variable but of course this then means that every row in the table has the same value as all rows point to the same variable.
Can anybody tell me how to have an unbound 'in-memory' column in a tablebox.
Any help appreciated,
Jonathan
0
Comments
What do you intend to do with the Quantity after the user has entered values?
There are a few ways that I can think of to do this.
Tres Tria Limited
The idea is that the user enters the quantities in a grid against the various colours/sizes (of clothing items) required and then clicks 'Accept' which will then create sales order lines for the appropriate item numbers.
The idea of the product configurator form is that the user doesn't want to be concerned with remembering item numbers for each combination of colour & size, they just want to enter that for example they want 20 green medium and 10 red small for a particular t-shirt.
Thanks,
Jonathan
My company, Tres Tria have a module that does just that for size colour style.
The fact that you intend to write back to the sales line table pretty much means that using an unbound variable is out of the question. Ideally you should store the value into a table (which could well be a temporary table). Have you actually got item numbers that include the size and colour, or are you using variants? Also, it gets slightly trickier, because what if the user wishes to make changes against the matrix at a later date.
In our solution, the user is displayed with a matrix of size against colour that pops open when the user enters an Item No. However, it is based on using variants, which I do not believe you are using.
Is there any reason why you would like to use unbound variables? You could use a temporary Item table variable, populate it with a filtered list of data from the Item table using CAL code, and then use an existing decimal field such as "Maximum Inventory". Once the user is happy, use CAL code again to create the sales line entries. Modifying a temporary record will not make any changes to the data in the Item table, and so if you do actually use the "Maximum Inventory" field, it will not be affected by the changes above.
Tres Tria Limited
If the customer does not have problems with additional tables then
- create 2 tables - one for sizes, one for colours
- create additional fields to Item table for size and color. link them to new tables
- use matrix box in your order form and tie the tables to X and Y axes of matrix
- use onaftergetrecord and onaftergetcurrentrecord of the matrix box to fill the matrix variable. You can get a hint from any Navision standard matrix box. You can use the sales line table as a base table - you can get the position in matrix by sales line -> item card -> size and color fields.
- use OnAfterValidate or OnAfterValidate trigger to actaully enter the data into underlying sales line table.
Using this approach it is simple to code - no need for temporary tables and also the iinformation is always saved in Sales Line table