Jump to content
DreadDamsel

Associating a contact with a membership number

Recommended Posts

Hi. I'm using FMPro 12 Advanced.

Creating a database for our community centre and I need to add a membership number to contacts - but not all of them.

I've created a separate table for Membership numbers (as not all contacts will have one, so serial numbers aren't appropriate).

Each membership has a number of details fields.

It's probably a REALLY logical and stupid problem I'm batting against - but I need to:

Select a contact>go to their details>add a membership number (go to a floating window layout, enter the details to the serial-number-derived membership) and have the details including the number show up in a tab on the contact's details layout.

I've created a relationship between my contacts file and my membership file via the Contact_ID>Contact_ID_fk and have played around with other relationships. 

I've also created a simple script from a button on the Contacts membership tab to go to the Membership Layout window and create a new record. But it keeps creating a new record in the Contacts, not Membership - even though the relationship only has to create new records in the memberships side.

I'm now running around in circles - please can anyone help me out here?????

Share this post


Link to post
Share on other sites

Why can't the membership no be in the Contact table? Can members have more than one number / are membership numbers unique?

Share this post


Link to post
Share on other sites

A simple solution is to mark a contact as a member (for example, by entering a date in a MemberSince field) - and then use a calculation field to show their ContactID as their membership number. True, the membership numbers will not be consecutive - but I don't see why that should matter.

If for some reason you do need consecutive membership numbers, then mark contacts as members by creating a new related record in the Memberships table. This can be done very simply by defining the relationship to match on ContactID, and allow creation of related records on the Memberships side. With this is in place, a simple:

Set Field [ Memberships::ContactID ; Contacts::ContactID ]

called from a record in Contacts, will create a new Membership record and automatically link it to the current contact. The Membership number itself will be, of course, an auto-entered serial number field in the Memberships table.

Share this post


Link to post
Share on other sites

Hi Mike - not all contacts are members, though those who are can only have a single membership number and class.

For example, a contact may be a government advisor - so not a member of the community house.

Also, a member may be either a voting or non-voting member - so different classes of membership.

We were also wanting membership numbers to be preceded by the joining month - so 052017-23 for example, this way we can easily keep track of when it's time to renew membership.

Share this post


Link to post
Share on other sites
11 minutes ago, DreadDamsel said:

We were also wanting membership numbers to be preceded by the joining month - so 052017-23 for example, this way we can easily keep track of when it's time to renew membership.

There is no good reason to add the joining month to the actual membership number. You can easily display the joining date (formatted as MMDDDD) alongside the membership number, if it helps. Although I believe a computer would be much better at keeping track of when it's time to renew a membership than a human eyeball.

  • Like 1

Share this post


Link to post
Share on other sites

Hm - what I suppose I could do is work on the basis that if a radio box is checked for "Member?", then the Contact_ID could show, otherwise it's left blank.

Reckon that would work?

Share this post


Link to post
Share on other sites
6 minutes ago, DreadDamsel said:

Reckon that would work?

It would. Clicking a button to populate a joining date field would work even better, IMHO. 

  • Like 1

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.


  • Similar Content

    • By owangolama
      Here is my situation.
      I have a 25x25 grid - let's call it a map. Think of it like a game board, like Battleship or perhaps an Excel spreadsheet.
      I have a 9x9 view of this grid since it is not possible for a phone user to practically view 25x25, but 9x9 seems to work fine.
      And I have the concept of Current_Location on the map, which is dynamic and changes based on other factors.
      In TABLE1 I have records of all the "cells"  in the 25x25 map that hold information about the cell (for example, the color of the cell). There is other information stored here that includes, for example, whether you can "see" other cells from this particular location in the grid. So in the record for, say, cell B5, I have a field that houses a return-delimited list of the other cells that can be "seen" from this cell (B5 in this instance).
      Another table, TABLE2 has records that are also have a field for Current_Location, and it tells me which cells (of the 25x25 grid) should be displayed in the 9x9 grid. Usually, the Current_Location is the middle cell in the 9x9 grid, but if the Current_Location is on the edge of the 25x25 grid, then the 9x9 view is adjusted accordingly and the Current_Location is shown on the edge of the 9x9 grid. The user can also change their orientation so they can view the map from a different direction. The way I store this information is in a field that simply lists (return-delimited) all the cell that should be shown in the 9x9 grid. So in our previous example of B5, the record for B5 has a field called Grid that is a list of the 81 cells that should be shown in the 9x9 grid.
      For other reasons, I cannot combine these two tables even though they both are based on the concept of relating information to Current_Location. TABLE1 is actually not as simple as described, but I'm trying to limit the scope of my question.
      So here is my question: I have 81 (sigh) objects on my layout for this 9x9 grid. I need to access information in TABLE1 for each of the cells that are represented in the 9x9 grid.
      For example, let's again assume that my Current_Location is B5 and by using TABLE2 I know the names of all the cells shown in the 9x9 grid (they are stored in a list in a field in TABLE2). How do I then get information about each of those 81 cells out of TABLE1. I.e., each of the 81 cells should be colored according to information in TABLE1.
      So, for the top-left cell in the 9x9 grid (which appears as the FIRST item in the list field in TABLE2), I need to be able to look up the color in TABLE1, and use it to drive Conditional Formatting of the cell. So if Color(B5)=3, then make the background color of the cell green. I can grab the cell name, and could easily write a script to figure out the color, but I need to *look up* the color to use it in Conditional Formatting.
      I was trying to generate another field somehow that was an analogous list of 81 items that showed the color of each of the 81 cells (in the correct order), but 1) I couldn't figure out how to do that without running a script (which would take too long since these things are changing frequently and I really just need a data lookup); and 2) I think there must be a much cleverer way. I am still very new to join tables, but I think the answer is in that arena somewhere. The other idea I had was trying to write a Custom Function since I can easily grab the name of the cell, B5. But I don't know how to create such a function since it needs to access a particular table and it seems like functions don't really work that way.
      Thanks in advance for any help!!
    • By alanf
      I have a table named Sales with the following data:
      ----------
      ID
      DATE
      UNITS
      -----------
      Based on Sample data below, i am trying to query the table by creating a relationship to find the ID that achieved a specified Unit amount on the earliest date.
      In other words, and for example, which ID achieved a specified Unit amount first (earliest date)
      Specified Unit Amt of 5 = 1 Expected records returned result
      301 10/13/2018 6.5 Specified Unit Amt of 2 = 2 Expected records returned result
      766 10/03/2018 2 360 10/03/2018 2  
      I think a selfjoin may be required.  Any thoughts appreciated!
       
      Thanks
      Alan
       
      SAMPLE DATA
                                         ID                          DATE                                     UNITS
      301 10/15/2018 9 301 10/14/2018 8.5 301 10/13/2018 6.5 360 10/14/2018 5.5 305 10/15/2018 5.5 301 10/12/2018 4.5 656 10/13/2018 4.5 360 10/13/2018 4.5 305 10/14/2018 4.5 611 10/14/2018 4.5 305 10/13/2018 4 15 10/13/2018 4 301 10/11/2018 3.5 360 10/12/2018 3.5 611 10/13/2018 3.5 301 10/09/2018 3 15 10/11/2018 3 656 10/12/2018 3 611 10/12/2018 3 200 10/14/2018 3 301 10/06/2018 2.5 611 10/09/2018 2.5 200 10/13/2018 2.5 766 10/03/2018 2 360 10/03/2018 2 785 10/05/2018 2 301 10/05/2018 2 611 10/05/2018 2 439 10/10/2018 2 656 10/11/2018 2 510 10/15/2018 2 360 10/01/2018 1.5 510 10/04/2018 1.5 611 10/04/2018 1.5 305 10/05/2018 1.5 200 10/08/2018 1.5 656 10/09/2018 1.5 785 10/02/2018 1 766 10/02/2018 1 305 10/03/2018 1 439 10/03/2018 1 15 10/04/2018 1 301 10/04/2018 1 200 10/07/2018 1 656 10/08/2018 1 766 10/01/2018 0.5 510 10/01/2018 0.5 611 10/01/2018 0.5 200 10/06/2018 0.5
    • By Richard Carlton
      Summer is over and our weekly FileMaker webinars are back! 

      Our first one is this Thursday at 11am PDT, on “Relationships for Beginners”. 

      Register Here: 
      https://attendee.gotowebinar.com/register/6892433068111504642 

      We will spend 30 minutes covering a specific topic. Then the last 30 minutes will be an open Q&A on any topic.

      Topic List:
      Sept 13th: Relationships for Beginners
      Sept 20th: Find Records, Date Ranges, and Special Operators
      Sept 27th: Conditional Formatting (Can I making something Red?)
      Oct 4th: Automation (Repetitive Tasks can become Scripts)
      Oct 11th: Reporting & SubSummaries
      Oct 18th: Merge Fields and Hiding Objects (Harry Potter Invisibility Cloak)
      Oct 25th: Sharing your FileMaker App with Co-Workers
      Nov 1st: Basic Concepts for Building Mobile Apps


      All the best, 
      Richard Carlton 
      CEO & Video Trainer
    • By LabMole
      Hello All. 
      Just dipping my toes into FM and finding it opens many possibilities. Still must learn a lot to be proficient, so TIA for help.
      Background: I sign out molecular diagnostic cases.
      We have a compendium of tests run in the laboratory (all the tests that can be ordered, run and reported out) A Test (type) can be run on many patients. A test (instance) has one patient and each test/report/result has a patient (one). Each patient can have >1 tests. There are a set number of reporting options per test  (TestA results can be Positive, Negative, Suspicious, etc (options are in a value list) Each report (ex: TestA/ReportPositiveHomozygous) has a specific text content (Table TestResults) (Pos/Neg, Report text, disclaimers, method, references) I seem to have figured out many of these relationships (I've attached my db)
      Where I'm stuck:
      1) I have not been able to create the relationship between the test result (tr_TestResult)  and the patient instance to link the result text to the patientTest instance (currently TOC Patient|TestResult).
      2) (not relationship related... rather a calculation problem): How to do the calculation so that TestOrdered:TestFinalized gets timestamped when TestOrdered:TestStatus is set to "Finalized".
       
      Thanks for the help!
       
      Molecular Reporting.fmp12
    • By Hproth
      I'm sure there is a simple solution to this problem, but I can't seem to figure it out!
      I have a custom app that allows the user to write letters amongst other things. 
      Each patient is linked to a GP and a Consultant, when writing a letter to a patient there is the option to CC both the linked GP and Consultant. However, occasionally another GP or Consultant might need to be CC'd in the letter (in addition to the ones already linked to the patient). So I would need the address of this additional consultant/GP to also be CC'd in the letter. For the life of me I can't work out a simple way to do this. 
      Does anyone have any suggestions?
      Thanks in advance.
       
×
×
  • Create New...

Important Information

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