5 Replies Latest reply on Mar 30, 2012 1:09 PM by philmodjunk

    Resetting field

    Arn

      Title

      Resetting field & Copying Database Field to Database Field

      Post

      Having an issue figuring out two processes.

      I have two databases setup. An Ogranization and a Member

      What I am trying to do is have the Organization # and Name write to fields in the Member database.

      Can not get this to work. It never shows anything in the Member database.

      The other piece to this is I am looking for a way to reset a member count field each time a new Organization is created.

      How would I do something like that?

      Thanks for any input on this.

        • 1. Re: Resetting field & Copying Database Field to Database Field
          philmodjunk

          Please tell us more about your database and what you want to do.

          Are your "two databases" two Files or two Tables in the same file?

          Is there a relationship between the organization and member tables? Perhaps: Organization::OrgID = Member::OrgID?

          If so, you can add fields from the Organization table on a layout based on Member and they will display data from the matching Organization record.

          Please describe the layout where you want to see this "member count field" and tell us how you want to use it. A summary field set to compute a running count that resets it's value with each new OrgID value may serve or it may not depending on how you need to use this value.

          • 2. Re: Resetting field & Copying Database Field to Database Field
            Arn

             Sorry, yes I have two tables in one database.

            I think I figure out my first issue. I used a Set Variable command to store the value than wrote it to the other table with a set field command. That is working the way I need it to.

            Basicly what I have is an Organization table and a Member table. You enter in the organization then click a button to goto the Member table layout. Which writes in the Organization #, name and starts the member # at 0001. That all works. That is also where I am stuck on how to reset the Member # back to 0001 for the next Organization, at the same time keeping the member count on the prior ogranizations.

            I do have a member count on both table, just not sure how to do this.

            Also, just ran into an issue with not being able to combine two fields.  Members_Organization# + Member# does not do anything.

            4400001 and 0001 are the records but it does not do anything, looking to end up with 44000010001 as the result.

            Only been using File Maker pro this week so far at this level of usage, kind of addicting really.

            Thanks for the help

            • 3. Re: Resetting field & Copying Database Field to Database Field
              philmodjunk

              I think I figure out my first issue. I used a Set Variable command to store the value than wrote it to the other table with a set field command. That is working the way I need it to.

              Ok, but you only need to do this with the Organization ID number, not the name. THere's no need to copy both values and it creates problems for you should an organization ever change their name. It's better just to include the organization name field from the related organization table whenever you need it. THen a name change updates automatically for you.

              You haven't answered my question about the member numer field. How will you use this field? Why does it need to start at 1 for each organization? This can be set up, but requires extra effort to do instead of just using a MemberID number that increments for each new record regardless of what organization they are a member of. If you have a multi-user database where two or more users might be adding members at the same time, it's especially critical as many methods for numbering member in this fashion might produce duplicate numbers when two or more users are creating new member records at the same time.

              Thus, you need to determine whether or not this is truly necessary.

              To combine the two fields like this is often unecessary. YOu can put <<Members_Organization#>><<Member#>> on a layout and they will appear as a single value and you did not need to add a calculation field that combines them.

              If you do want to use a calculation, write it like this: Members_Organization# & Member#

              • 4. Re: Resetting field & Copying Database Field to Database Field
                Arn

                 I was not able to get the relationship between the two table to work.

                Ogranization ---- Members_Organization  comes up blank on the Member Table.

                Ogranization# ---- Members_Orgranization# same thing. So I must be missing a step someplace.

                As far as the Member # goes you can have up to 9999 members per organization. But I see your point on letting it increment.

                Might work out better in the long run.  The combined Orgranization #and member # turns into a UPC A barcode for scanning. Which is the Members_Card#

                Thanks again.

                • 5. Re: Resetting field & Copying Database Field to Database Field
                  philmodjunk

                  I'm now assuming you have two tables in the same file named "Organization" and "Members_Organization."

                  Ideally, Orgainization::organization# should be defined as an auto-entered serial number. Then, in manage | database | Relationships, you should drag from Organization# in Organization to Organization# in members_organization. I'm not specifying Members_Organization# here as with most naming conventions used in Filemaker, this field would be the field for storing the member's ID number instead of the organization number.

                  With this realtionship and with the correct matching values in the Organization# field in both tables, adding fields from Organization should correctly display data on a layout based on Members_Organization.

                  It looks like 9999 is the limit for your Member ID numbers due to the size of the barcode you will print on a member's ID card. I suggest that you only print the MemberID serial number from Members_Organization as the barcode and not include the organization number. If the memberID is an auto-entered serial number like I have recommended, then you this is all you need to pull up both the member's membership record and that of the related organization. This way, you can use every character of the barcode for the memberID number.