Jump to content
Sign in to follow this  
bruceiow

popup menu data source - how to add conditions

Recommended Posts

HI all,

 

I have a table called "locations". That table has an (int) ID (string) Location Name and (int) valid.

 

I am using that table as the basis for a couple of popup menu "values from" lists. I can't see anywhere in FM the option to create a custom value list.

 

What I need to do is for one of the popup menus, only include values where the valid field = 1. in SQL terms it would be select * from locations where valid = 1.

 

Other popup lists on there will need all of the rows, regardless of their valid setting.

 

As far as I can see, there is only the ability to include ALL rows of a table or a custom list of hard-typed values.

 

Many thanks

Share this post


Link to post
Share on other sites

What I need to do is for one of the popup menus, only include values where the valid field = 1. 

 

Another option:

 

In your Locations table, create a calculation called cValidID, (result is number) with:

If ( Valid ; ID )

Then create a new value list called Valid Locations.  Based the first field on this calculation cValidID instead of the original ID field.  Select the location name in the second field to display.

 

Edited ... make the ID the same data type as your primary ID which I see is number.

Edited by LaRetta

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    2 members have viewed this topic:
    JMart  rudym88 
×
×
  • Create New...

Important Information

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