Jump to content

Conditional Value List


BrianKL

This topic is 8128 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have found that I need to use conditional value list for my problem. The example that I found consisted of two files. However, I have only one file with the same two fields as the example, Category and Item. I followed the example and I got a bit confused because they were using two files and I am only using one file.

In the example from www.databasepros.com (I conducted a search on conditional value list), the two files they used were Menu and PopUp. In the Menus file, the only two items were Category and Items. Both were text and indexed. The same two fields in the PopUp file were not indexed. So, since I had only one file, I made them indexed text.

Now, when I was defining the Value List for Category I checked 'Use values from field:' and I then highlighted the field which is Category and checked 'All values:' Now, next to the All Values is a Specify File which has the file Menus. Since I am only using one file, do I need to use the 'All Values' or 'Only Related Values:' from Category.

I went to define the Items Value List and I checked 'Use values from field:' and I hit Specify and I checked 'Only Related Items' and I then had to create a Relationship. My problem is this. Since I want to select Category and the only thing to show up under Items is the related items from Category, how is my relationship going to be? Is it from Category to Item, or Item to Category? In the example since they are using two files, the relationship is Category::Category. So, once I have created my relationship (still in question how) do I select ::item for 'Only Related Items'?

I have tried numerous combinations and I still can

Link to comment
Share on other sites

I'm not sure if this is what you want. If I understand you, you have a file with two fields, Category and Info and you want to have a menu that only shows options for Info that are already set for the current Category. In other words, once you select the Category you would like to select from Info options based on that Category.

Example: Take a look at the following records:

Category: A

Info: A's Info

Category: A

Info: More A's Info

Category: B

Info: B's Info

Category: C

Info: C's Info

Then you create a new record and set the Category to A. Clicking into the Info field would give you the options of selecting "A's Info" or "More A's Info".

If I understand that correctly, here's how you would do it.

Create a relationship in the file that has itself as the related file and the Category field as the match field on both sides of the relationship.

Create a value list and call it CondInfo. Select Use values from field: and in the resulting dialog box select Only related values and select the relationship you just created. In the Use values from this field, select Items. Attach that value list to the Info field in your layout.

Chuck

Link to comment
Share on other sites

This topic is 8128 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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