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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

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