Jump to content
Server Maintenance This Week. ×

Conditional Value List


aguest

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

Recommended Posts

Hi,

 

I've got two table Staff and stafftype (which are linked via a relationship on StaffType) with which I've created a value list so that a staff memebr can be chosen on a layout through a drop down box.

 

My stafftype table tell me whether the member of staff is a teacher, TA or support staff.

 

Currently my value list is displaying all staff in the staff table. How do I make it conditional so that it will only show Teachers or TA's?

I will end up creating a number of lists to show each type seperately due to how they need to be used in the layouts.

Thanks
Ann

Link to comment
Share on other sites

Hi,

Thanks I've already done this but the instructions involve you selecting a type from a drop down first which limites the next drop down. I don't want to have to do this.

 

I've attached a screenshot from my layout so you can see what I mean. I have a drop down for teacher, which I would like to just show all teachers without having to pre select a box and later a box for TA which I would just like to show all the TA's.

 

If we were to look at this from an access point of view, it would be the equivalent of putting a query behind the box as a control source that just limits the drop down.

 

Could I do it with a variable perhaps? Will a relatioship look at a variable.

post-112258-0-27069900-1422621562_thumb.

Link to comment
Share on other sites

Currently my value list is displaying all staff in the staff table. How do I make it conditional so that it will only show Teachers or TA's?

If I understand correctly what you're saying here:

 

I have a drop down for teacher, which I would like to just show all teachers without having to pre select a box

 

then you do not want make it conditional: you want the value list to show only teachers at all times, unconditionally.

 

 

What you can do here, is define a calculation list in the Staff table, along the lines of =

Case ( StaffTypeID = 3 ; StaffID )

and base your value list on this field, instead of the StaffID field, which holds a value for all Staff records. You will have to repeat this for every type for which you want to have a filtered value list.

 

This is assuming your Staff --<  StaffType relationship is based on matching StaffTypeID (not sure why you need this arrangement - could you not just have have a Type field in the Staff table directly?), and that each Staff member belongs to one StaffType only at most.

 

 

There's another way to do this, with relationships - but you would need to add a relationship, along with a dedicated table occurrence of the Staff table, for each type.

 

 

The really elegant alternative is to forgo the use of a value list altogether and make your selection from a portal or from a list view in a popup window.

  • Like 1
Link to comment
Share on other sites

hi,

 

thank you for your comment. How would I make a selection from a list view in a pop up window. I think that is what I'd really like but couldn't figure out how to do it without making a value list.

 

Thanks for all the support. :yep:

Link to comment
Share on other sites

There is a FileMaker help topic on this that I'm using. I have a similar thing going on. Basically, for "individuals" I have two "types," attorneys and paralegals. A given patent has one attorney and one paralegal. What I did was in the patents table is set up an attorney type field that always is "attorney," and a paralegal type field that always is "paralegal." Then, in the database relationships, I set up two instances of individuals. One is linked to patents via individual type equalling attorney, and the other equalling paralegal. Again, this was all straight from the FM help topic (will need to find this on google).

So, when I set up conditional value lists, I just choose from the appropriate instance of individuals.

What I have learned from being on this forum is that generally my solutions are not the optimal ones. But this is one way to do this.

Link to comment
Share on other sites

 

 

The really elegant alternative is to forgo the use of a value list altogether and make your selection from a portal or from a list view in a popup window.

I hadn't thought of a list view in a portal before; thanks.

 

What I have learned from being on this forum is that generally my solutions are not the optimal ones. But this is one way to do this.

You're doing better than me then!!

Link to comment
Share on other sites

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