Jump to content

A require script..

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

Recommended Posts

I need a script to validate two fiels depend on the list value.


Let we have costumers of two categories. Costumers that eat meat and the vegetarians

First list


No Vegetarian

Second list





It does not necessary for vegetarians to open the Second list and sometimes they do it by mistake and create confusion. So the script must prohibit the vegetarian to open the list or warn them that they open a wrong list. However it must require the no vegetarians to select a value of the list.

I think that it is easy to understood is not complicated.


Link to comment
Share on other sites

The records for the second list needs to have a category of whether they are means or vegetarian food.

Can you explain your "lists" further. Are they custom value lists or are they value lists that come from a field? Or are they something completely different?

If they are records, then you can have the table of food items have a field that categories them as "Vegetarian" or "No Vegetarian". Then you can use a pulldown menu or other technique to diplay only those items.

Link to comment
Share on other sites

It is a costumer table and there are the two fields:

Nutrition field: with a custom value list vegetarian, no vegetarian.

Kind of meat field: with a custom value list pork, beef, chicken, dag.

The two fields are shown from a portal in a nutrition pyramid table.

When a user select vegetarian from the first list it does not necessary to open the second list. Of course the most of them they do not but I have examples that we can order meat for no vegetarian people. I hope that I help a lot.


Link to comment
Share on other sites

I think if you make it so that the meats are in a related Foods table with fields category and item then this can be achieved.

The relationship would be keyed from your nutrition field to the category field. Then the value list would be based off this relationship and uses the item field.

When the user selects 'no vegetarian' then the value list should only show you the items which category is 'no vegetarian'.

Link to comment
Share on other sites

I have already read this paper. However it is against in your example given above. You have establish a many to many relation that will brake in a time. I also discover that when a user select by mistake the no vegetarian value, the meal list popup the previous value that have been selected by mistake. So it is calculate the first value of the meals! Thank you anyway for your response. I will try to validate this field with a calculation and then trust the God that no one user will make a mistake...


One I know that I do not know anything...

Socrates the Greek

Edited by Guest
Link to comment
Share on other sites

This topic is 5745 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.