Jump to content

v12 filtered value list


ron G

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

Recommended Posts

This is a tough one.

 

I have a Membership application.

 

I have a popup that works.  (not the problem). 

Part of the data I collect on each Member is if they are "Active" or "Inactive"  (Members::ActiveInactive)

To that end there is a Members::ActiveInactive field that holds the appropriate "Active" or "Inactive" value.

 

My tables are :

 

post-72145-0-15865900-1377211159_thumb.j

 

I have a layout based on Meetings.

on the left side of the layout there is a portal based on:  MemberMeetingJoin .  This holds the members to show at a particular meeting.

 

On that portal there is a field: KF_Member which is a popup that grabs:

              MembersTOC::KP_MemberID and MembersTOC::Name_LastFirstMI

post-72145-0-14427900-1377212000_thumb.j

This all works.

 

The problem is that my users are adding a lot of historical records that include a lot of deceased (hence "Inactive") members.  These Inctive members show in the popup.   

 

I want to show only the "Active" members.

 

I tried:

Creating a new TOC of Members called MembersActiveInactive.  Then I

created a caluclated field:  cActiveInactive that references MembersTOC::ActiveInactive and then establishing a relationship between MembersTOC::ActiveInactive and MembersActiveInactive::cActiveInactive.

 

With this done, I defined my popup to include  relationships from MembersActiveInactive

 

post-72145-0-90721900-1377212145_thumb.j

 

but...

 

It works when I click an existing record.

But, when I click a new/empty field it just shows "...other".  No popup values at all.

 

What am I doing wrong?

 

Link to comment
Share on other sites

This is a tough one.

 

:no:

 

Creating a new TOC of Members called MembersActiveInactive.  Then I

created a caluclated field:  cActiveInactive that references MembersTOC::ActiveInactive and then establishing a relationship between MembersTOC::ActiveInactive and MembersActiveInactive::cActiveInactive.

 

With this done, I defined my popup to include  relationships from MembersActiveInactive

 

This is rather convoluted; also, this way the value list only has values if you're in the context of Members. What you want is a context-free value list that you can use in your join table.

 

Simply define a global calculation field with the result 1 (every home should have one), then connect, say, Members to a new TO like “MembersActive” and use these two fields as predicate for the relationship: gOne (in Members) = ActiveInactive (in MembersActive), or gOne ≠ ActiveInactive, depending on which flag you set. Now a value list starting from Members and using fields from “MembersActive” gives you all the active members.

 

Here's a little illustrated primer:

 

1. To have a value list holding only favorite musicians

post-80889-0-98770600-1377221353_thumb.p

 

2., 3. Create a relationship from anywhere in the Graph (you only need a table with an appropriate left match field, preferably a multi-purpose global)

post-80889-0-16221800-1377221366_thumb.p   post-80889-0-89350100-1377221398_thumb.p

 

4. Define a value list

post-80889-0-20965400-1377221415_thumb.p

 

5. Use it in whatever context you want

post-80889-0-74797500-1377221440_thumb.p

Link to comment
Share on other sites

Thanks for the ideas.

I got it to work by creating another TO of Members called ActiveInactiveMembers and created a calulated field whereby cActiveInactive=if(ActiveMembers::ActiveInactive="Active";ActiveInactive::Name_LastFirstMI).  Then I set a relationship between MembersTOC::ActiveInactive and ActiveInactive::cActiveInctive. 

 

Next on my layout I constructed my popup to reference FK_MemberID and ActiveInactive::Name_LastFirstMI.

 

Ba boom...

Link to comment
Share on other sites

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