Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A require script..

Featured Replies

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

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.

  • Author

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

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'.

  • Author

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

  • Author

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

  • Author

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 by Guest

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.

  • Author

How can I do this? If you want to help. Is there any scripts to do?

Pascal

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

  • Author

It is not the same believe me if you look carefully so I did not post the same post I know the rules.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.