Help With: Intelligent Form Design/Storing Data

Hey guys,

Per my other post about automatic letter increments for a code field, I figured I’d ask on here and see if anyone could help with the second part of my project.

Essentially, here’s what we’re doing. For any given item (you know, the Items table in NAV), we’ll have anywhere from 10 to 50 additional attributes, called “parametric data.” Some examples of these would be length, width and height, links to photos of the items, as well as technical data (for example, resistance if we’re selling a resistor)

The item table itself doesn’t really have sufficient space to store all this. At first I tried creating 120-something new fields that would hold all the responses, but couldn’t compile the changes since it went above the 4KB limit.

Instead, I created a new table, named Parametric Data. This, as of right now, has four columns. Code (the unique 3-letter sequence I discussed in the other thread), Applies To (this is just a code field that’s tied to Product Group Code), Name and Possible Values. Since it’s a completely new table, we have lots of duplicates - each product group code (there are maybe 20 total) has its own set of 10-50 rows.

Essentially, what’s stored in the Parametric Data table are the headers that will be used in a form. Possible values should be obvious - if there’s nothing, it assumes it’s a “free form” text box, otherwise it’ll be a dropdown list of the entries. (“a,b,c” would have 3 options - a, b, and c.)

Now… each item will need its own parametric data “responses” stored. So here’s what I envision. We’d edit the Page for the Item record - that way, when we do item setup in Role-Tailored Client, we can press a button that says “Parametric Data”, which will load an entirely new form. That form will be generated from the Parametric Data table in such a way that each header (the “name” value) will show up on the page, with a spot to put the value below or next to it. The way NAV will know which headers to display would be driven by “applies to” - basically a quick matching "if “product group code” value = “applies to” value, show on the form; if not, don’t)

Now comes the part of actually storing the data. Once the user is done entering all the responses, they’d click “Apply” or “OK” on the form, and some behind-the-scenes magic will occur. Say, for example, that “height” is Code value AAA. It might store, in “Parametric Data Response”, “AAA=2”, if the user specifies 2 as their height in inches. I have already added a 250-character text field to the item table (though I may need more, depending), where this would be stored. Essentially, “[Code]=[User’s response]” for each header/response pair, separated by commas or semicolons.

When the form is loaded again (once the data’s already in there, if they want to just view it), another background formula would just do the reverse - take AAA, swap that for the “name” value in that row, and then display the response below or next to it.

That being said - I have no idea how I’d do this. I know how to make a new Page or Form in Object Designer, but I know nothing about the behind-the-scenes programming that’s involved in making this functional. Any help would be greatly appreciated!

Your description sounds like a hot mess.

but to avoid unwanted duplicates you have to think about creating some kind of primary key

also I see you don’t mention item number as a field in your new table so how are you going to assign these extra item attributes to a specific item?