Jump to content
Sign in to follow this  
Matt Malyschko

Conditional Value Lists

Recommended Posts

I have a table that holds all inventory in stock - CurrentInventory

This contains:

ItemID

ColourID

SizeID

Qty

There may be the same ItemID, with different ColourID, and different SizeID.

Eg:

Item 1, Colour 1, Size 1, Qty 5

Item 1, Colour 1, Size 2, Qty 5

Item 1, Colour 2, Size 1, Qty 5

Item 2, Colour 2, Size 1, Qty 5

I want to create a value list to be accessed from my Purchases section, that only lists the available ItemID, and then once that is selected, shows only available colours in the ColourID field, and so on.

How is this do-able? All the examples I have seen have 2-3 tables for the set up, but all the information of mine is stored in one table..

Share this post


Link to post
Share on other sites

All the examples I have seen have 2-3 tables for the set up, but all the information of mine is stored in one table..

One would expect your example to have a table of Colors and a table of Sizes - otherwise the ColourID field must hold the actual color and the SizeID the actual size. If that's the case, you can still have your conditional value lists:

1. Define a relationship where:

Purchases::ItemID = Inventory::ItemID

2. Define a value list of AvailableColors, using values from Inventory::ColourID, include only related values starting from Purchases;

3. Repeat #2 for sizes.

Share this post


Link to post
Share on other sites

One would expect your example to have a table of Colors and a table of Sizes - otherwise the ColourID field must hold the actual color and the SizeID the actual size. If that's the case, you can still have your conditional value lists:

1. Define a relationship where:

Purchases::ItemID = Inventory::ItemID

2. Define a value list of AvailableColors, using values from Inventory::ColourID, include only related values starting from Purchases;

3. Repeat #2 for sizes.

excellent!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    SRBENET 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.