edudna Posted December 29, 2006 Posted December 29, 2006 I need a script to validate two fiels depend on the list value. Example Let we have costumers of two categories. Costumers that eat meat and the vegetarians First list Vegetarian No Vegetarian Second list Pork Beef Chicken Dug 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. Pascal
mr_vodka Posted December 29, 2006 Posted December 29, 2006 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.
edudna Posted December 29, 2006 Author Posted December 29, 2006 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. Pascal
mr_vodka Posted December 29, 2006 Posted December 29, 2006 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'.
edudna Posted December 30, 2006 Author Posted December 30, 2006 Please explain further or give an example because everything I do have no result. One field can "trigger" the other. Do you mean that categories should convert to fields? Pascal
edudna Posted December 30, 2006 Author Posted December 30, 2006 It is many to many relation that is not suggested from FM experts but it really works fine!. Thank you for you response anyway. Pascal
edudna Posted December 30, 2006 Author Posted December 30, 2006 (edited) 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... Pascal One I know that I do not know anything... Socrates the Greek Edited December 30, 2006 by Guest
comment Posted December 30, 2006 Posted December 30, 2006 You could set the Meal field to clear when the Category is modified. If there's a many to many relationship here, I must have missed it.
edudna Posted January 5, 2007 Author Posted January 5, 2007 How can I do this? If you want to help. Is there any scripts to do? Pascal
Søren Dyhr Posted January 5, 2007 Posted January 5, 2007 Please do not x-post, this is the same queston as this http://www.fmforums.com/forum/showtopic.php?tid/183411/post/235009/#235009 more or less?? --sd
edudna Posted January 5, 2007 Author Posted January 5, 2007 It is not the same believe me if you look carefully so I did not post the same post I know the rules.
Recommended Posts
This topic is 6534 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 accountSign in
Already have an account? Sign in here.
Sign In Now