Drop down box with list of choices..

yuppicideyuppicide Member Posts: 410
edited 2012-02-11 in Navision Attain
Nav 3.10

What am I doing wrong to get a drop down box with list of choices?

I've created something on the Item Card to be able to list Manufacturer. These are 3 digit abbreviations for whom we get clothes made by. Could be ITF, GNG, RSB, PTD, CHC, etc.

This way we can quickly pull up an inventory list of every item one manufacturer makes and see how many in stock, on order, etc.

The problem is if someone spells that 3 digit code wrong. So, I figured I'd make a drop down box of choices.

I created a table with a field Manuf Code 3.

I've created a form also with Manuf on it which uses source table Manuf.

I have my Textbox on my Item Card already.

I can't figure out how to make the list of choices pop up.

I tried looking at other things that do that and it was no help.

I see DrillDown and DropDown, but don't know the difference between the two. I tried to set a TableRelation. Looking at properties of other things that have a drop down list of choices, I see they have TableRelation as Undefined.

This will also be useful I think as you previously helped me add other things to my Item Card. I can apply this there as well and only give people a list of choices.

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    It is very hard to understand what you are trying to do, but it seems a better solution would be to create a look up and link to a separate table where you store a list of manufacturers.
    David Singleton
  • SavatageSavatage Member Posts: 7,142
    on the item table look at fields 21 & 31 - those are two choices you have and you can use them as examples.

    Field 21 is an option type field & if you view the properties you can see how the options are set. Now if these manufacturers you have don't vary then option might be a choice. You can always add more to the end but it's not something you want to do if it changes frequently.

    Field 31 the Vendor No field. view the properties & see the Table Relation is set to vendor for the lookup.
    If your manufacturers change or if you always have new ones being added then a seperate manu code table with CODE & Manufacturers Name is a better choice. remember to set a primary key to your new table.
  • SavatageSavatage Member Posts: 7,142
    Even Better look at field 5701 Manufacturer Code - it's already done for you - just add it to your item card if it's not there.
  • yuppicideyuppicide Member Posts: 410
    Yes, I saw that Manufacturer Code. I see SourceExpr is Manufacturer Code. But on the Item Card it's listed as "Type - Manufacturer Code" so they were using it for item type. I think they originally started using it for the wrong thing, but we don't use that anymore.

    Looking in there I see stuff like Pants, Skirt, Shorts, Shirt, Coverup, Capri, etc. Different types of clothing.

    I could easily just use that as well to add my manufacturer.. I was just thinking I didn't want to mix up my new stuff with the old stuff in case they ever did want to use that old stuff again.

    So, I guess now my question is if I'm going to just use what's there already. I can delete my Table and Form I created since I won't be needing them, but I see Item Card still has Field "Manufacturer". Is there a way to get rid of that or will it go away on it's own once I delete the table and form?
  • SavatageSavatage Member Posts: 7,142
    I would delete it from the form because once you delete it from the table you won't beable to open the form again. Then you will have to open the form thru object designer to delete the field anyway.

    As far as Pants, Skirt, Shorts, Shirt, Coverup, Capri I would think thats fits better in the Item Category field (5702) instead of the Manufacturer field (5701).

    But if you don't want to change what you are using or keep seperate Manufacture Code & Manufacturer Type. Then you could just copy how 5701 works for your new field.

    Good Luck!
    yuppicide wrote:
    But on the Item Card it's listed as "Type - Manufacturer Code" so they were using it for item type. I think they originally started using it for the wrong thing, but we don't use that anymore.
    Someone probably just renamed the Caption of the field so it made more sence of what it was being used for. But if you're not using it then clear it out & use it for what it was intended for and fix the caption.
  • BernardJBernardJ Member Posts: 57
    To go back to your first question: it's a better idea to define a tablerelation on the field in the item table instead of the form. This way the tablerelation will work on all the places where you are using this field Manufacturer.
    In order to get the lookup to work you'll also need to define the newly created form as the default lookup form for your new table; to do this view the properties of the table (go down to the last line in the table designer and move one more line lower, then view properties), and set the property LookupFormID to your form.

    Hope this helps
Sign In or Register to comment.