4 Replies Latest reply on Dec 18, 2015 1:37 PM by BillisSaved

    Tags for distributing notes

    jacobjz

      I'm looking for a nice to way to distribute notes to many different parties depending on what tags are important to them.

       

      I want to have one table of notes with a variety of 'tags' or categories to choose from. This is a finite list and will not expand. For instance, when creating the note you can flag it as "urgent" and relating to "finances" and "HR". You should be able to choose as many or few of these options as you want.

       

      I then want a second table of just reports linked. You can create a report for a specific person, and then select which tags they will see. That way a person will see every item "urgent" item relating to "HR", but nothing in finances unless it has been cross tagged with one of the other categories. I want the reports to break down notes by tag, with separate headings for "urgent" and "HR". If an item is in both, it should appear twice on the report.

       

      As I said these tags are a finite list, they can be hard coded in and I don't need the ability to add more. Ideally each note is a table line and the tags are just a series of text boxes you can tab through.

       

      I apologize if this is a total newb question, and I appreciate any help!

        • 1. Re: Tags for distributing notes
          BillisSaved

          Good afternoon jacobjz,

           

          I hope your day is going well. I think I would begin by adding a text field to the Reports table you mentioned and name it something like "Tags". Then create a value list that contains the tags you need. When someone adds a Report record, provide an object on the layout that points to the Report::Tags text field. Set the control style to of that layout object to Checkbox set and point the Values from: option to the the Tags value list you created. This will allow the user to select as many values as they like, which will be inserted into the Report::Tags text field as a return delimited list.


          When you generate the report, use a conditional PatternCount(Report::Tags;"tag of your choice") = 1 statement to set up the filtering of the data. I think something along this line of thought would work. Good luck!


          God bless,

          Bill

          • 2. Re: Tags for distributing notes
            jacobjz

            Sorry, I followed you until the PatternCount. Where would I use this in the report?

            • 3. Re: Tags for distributing notes
              siplus

              sometimes remembering that Filemaker is a DBMS is a good exercise.

              • 4. Re: Tags for distributing notes
                BillisSaved

                Hey jacobjz,

                 

                I would use a script something like this either when the report layout loads or when the user selects a filter option:

                 

                Show all records

                Go to Record/Request/Page [First]

                Loop

                     If (PatternCount (Report::Tags; Get (ScriptParameter)) = 0)

                          Omit Record

                          End Loop

                     Else

                          Go to Record/Request/Page [Next]   /* make sure you select Exit after last

                End Loop


                Using Get (ScriptParameter) makes the script more modular.  You can pass the parameter value (i.e. your tag) to the script based on whatever criteria you choose. Hopefully that makes some sense. I'm sure, like most everything in FileMaker Pro, there are multiple ways to accomplish the same task. Good luck!



                NOTE: If the last record in the found set does not include the specified tag, this script will loop through the records a second time. I'm sure there is a more efficient way to accomplish your goal, but I'd need to see a sample of your solution to figure it out.


                God bless,

                Bill