1 2 3 Previous Next 30 Replies Latest reply on Dec 7, 2016 5:41 PM by jsml

    How to add/remove values from checkbox field

    openspace

      I have a field TagsFundraising containing a check box set (see below).

       

      Fundraising Tags

      top donor: anyone who's donated $500 or more in any given year or has given any amount for 5 years or more.

      active donor: anyone who has donated in the last 4 years.

      lapsed donor: anyone who has donated previous to the last 4 years.

      prospect donor: anyone that has provided their contact info but has never donated.

      business donor: any company donating in the company name.

      member (active)

      member (lapsed)

       

      I would like to add these tags to a contact automatically using calculations from related records. How can I add and remove values to a contacts TagsFundraising field?

       

      Example 1:

      Joe has made one donation of $500 and has a lapsed membership.

      Joe's TagsFundraising field would contain: top donor ¶ active donor ¶ member (lapsed)

       

      Example 2:

      Susy donated in 2002.

      Susy's TagsFundraising field would contain: lapsed donor

       

      Example 3:

      Susy recently donated $5 in her company's name and bought a membership.

      Susy's TagsFundraising field would contain: business donor ¶ member (active)

        • 1. Re: How to add/remove values from checkbox field
          pjreagan

          Hmm...  I would have separated donor type from member status.  These are two different things, so in my mind anyway, it might be easier in the long run to have separate fields. 

           

          Why do this as a check box formatted text field?  Is this for presentation purposes?  If so, I'd probably use a script to update the values.  The script could be run by a scheduled server script or by the first person opening the file each day.  It also could be triggered when a new donation is made.

          • 2. Re: How to add/remove values from checkbox field
            adamcrute

            Create a Value List for your Fundraising Tags (it can be sourced from a table, or you can enter the values directly in the Value List edit box). Then, in a "screen" layout, create a "checkbox set" object with the TagsFundraising field as its data source. Make sure the checkbox set object is selected then, in the Data tab of the Inspector (shown in layout mode), select the Fundraising Tags Value List in the "Values From" dropdown.

             

            The checkbox set will now show a checkbox for each item in the Value List. Any checkboxes you check will add that entry to the field; any you uncheck will be removed from the field. The field content is maintained as a "list", which is FileMaker speak for a list of items separated by carriage returns (which is what you're already doing in your TagsFundraising field).

            • 3. Re: How to add/remove values from checkbox field
              openspace

              My thoughts exactly regarding the membership types. Our donor consultant actually insisted they be placed in the fundraising tags so that sorting can bring up certain lists for statistics purposes. That aside, I've already created a separate field that calculates whether a membership status is active or lapsed so sorting with a script step is simple.

               

              I'm using a checkbox set for organizational and display purposes, so the user can select preset tags for each contact (see screen shot 1) that can later be used to sort a list. The Open Space and Outreach tags must be selected manually while the majority of the fundraising tags could be automatic.

              Screenshot 1.png

               

              In list view, the user can select anyone one of tags to display a list (see Screenshot 2).

              Screenshot 2.jpg

               

              That's a great idea. I will probably set up a script that is triggered by certain actions, like a new donation or upon loading the database.

               

              Do you know what script step would add and remove tag values so there are no repeating tag values?

              • 4. Re: How to add/remove values from checkbox field
                openspace

                Thanks for your reply, that's actually what I've already set up (see post above with screenshots). My question is what script step can be used to automatically add or remove a checkbox so there are no repeating values. This would help generate more accurate tags for the user, so they don't have to go back periodically and manually update the fundraising tags for each contact.

                • 5. Re: How to add/remove values from checkbox field
                  wimdecorte

                  No script step needed: when you check a check box, FM adds the value to the list that is kept in the field.  And vice versa when you uncheck a value.

                  There will be no repeats because every value in a value list is unique.

                  • 6. Re: How to add/remove values from checkbox field
                    mtwalker

                    I think what they are asking is that the checkbox fields be updated automatically. E.g. when a lapsed donor makes a donation, the correct checkbox is set. Some of those steps would easy. Others others are going to require more complex calculations.

                    • 7. Re: How to add/remove values from checkbox field
                      openspace

                      You got it Todd, that's exactly my question.

                      • 8. Re: How to add/remove values from checkbox field
                        wimdecorte

                        Then I would show a checkbox, but a portal of related tags.  Whatever workflows that decides to add or remove a tag then just has to look for the proper related record to act on.

                         

                        Will be much easier to report on too if you need to create a overview of who is current for instance, or any other tag based overview.

                        • 9. Re: How to add/remove values from checkbox field
                          openspace

                          Apologies if I misunderstand your post, I'm just not sure how it would lead to automatic checking/tagging without actually dragging the mouse over and clicking the box.

                          • 10. Re: How to add/remove values from checkbox field
                            wimdecorte

                            openspace wrote:

                             

                            Apologies if I misunderstand your post, I'm just not sure how it would lead to automatic checking/tagging without actually dragging the mouse over and clicking the box.

                             

                             

                            It wouldn't because there would be no such box anymore.  Just a portal of tag records.

                            • 11. Re: How to add/remove values from checkbox field
                              pjreagan

                              If we're just talking about how to get the check box items to "check" or "uncheck", then all your script needs to do is insert that value into the field and the check boxes will automatically place an "X" where necessary. 

                               

                              So your nightly update script could do a find by donors with lapsed memberships.  If any records are found, it should then replace the field contents with its original value that's had its "member (active)¶" value substituted with "", and "member (lapsed)¶" concatenated on.  The check boxes should see this change of field values and display as though the user had checked the boxes.

                               

                              The same nightly script would have to do finds for the other business rules you mentioned and replace values in that field accordingly.

                               

                              BTW: if you do go the route of a nightly update script, you would save your users lots of grief by not allowing them to enter that field!

                               

                              Does this help?

                              • 12. Re: How to add/remove values from checkbox field
                                openspace

                                This helps greatly, thank you! I'm going to try and separate the fundraising tags so the fields can be populated individually--which will allow me to set the fields but bypass any duplicates from occurring. How do you schedule a script to run at a specific time? I'm running filemaker pro 13.

                                • 13. Re: How to add/remove values from checkbox field
                                  wimdecorte

                                  openspace wrote:

                                  How do you schedule a script to run at a specific time? I'm running filemaker pro 13.

                                   

                                  That is something you do in the Schedules section of the FMS admin console.

                                  (Remember that not all script steps are supported AND that your onOpen script - if any - will also run)

                                  • 14. Re: How to add/remove values from checkbox field
                                    jbrown

                                    Hi. To run a script at a specific time, you need to schedule a server-side script, which means you need to be able to work with FileMaker server. Do you have access to that? If so, you can set the information there: what file contains the script, what log in information will be used, the script name, any parameters. You can set the time and frequency of running (every day, once a week, etc).

                                     

                                    There's  quite a few cautions when using Sever-side scripts, so tread into those carefully. That said, this workflow is a good place to jump into it.

                                     

                                    First question: Do you have access to the server console?

                                     

                                    And we'll go from there.☺

                                     

                                    However, i don't think its too difficult to keep this within FM. Let me think my way through it a bit more. See if I can come up with another idea.

                                    1 2 3 Previous Next