11 Replies Latest reply on Dec 22, 2011 12:28 PM by Nicole

    How to create a marked record within a found set in multi-user environment?

    Nicole

      Hello,

       

      I am new to the FileMaker Community and would like some help to figure out how to create a marked record in a found set within a multi-user environment. What are the best practices for this and what pitfalls should I look out for?

       

      The setup:

       

      I am currently using the contact management starter solution with some modifications. No additional tables only some added fields. The file is hosted on FMP 11 on a Mac Mini server running Snow Leopard (10.6.8) Server. The client machines are running Snow Leopard 10.6.8 and FMP 11. The file is fairly small, just over 10,000 Contact records and 20k - 30k Notes records.

       

      The requirements:

       

      I need to be able to make a marked record within a found set for each user. The user needs to be able to make multiple found sets with marked records. They would have to have a related description to be able to make it easier to find when trying to go back. The user would only see his/her marked records, unless they would wish to share with another user. The found set needs to be remembered in the sort order that the user created with the marked record in the same location in the found set when recalled. The users do not want to open a separate window with the found set and they need to be able to come back to this set at a later date. Could be hours, days, weeks, or months later.

       

      For example:

       

      The found set has 321 records. The specific marked record is number 206 in the sort order that the user is seeing. The user wants to be able to mark their record '206' and save the found set. Some time goes by and the user wishes to revisit their work on this found set. When they perform an action? they are taken to the same set of records with current database information. 321 records in the same sort order with what was record 1 equal to the current record 1 and their record 206 equal to the old record 206.

       

      Thank you for your help,

      Nicole

        • 1. Re: How to create a marked record within a found set in multi-user environment?
          databuzz

          Hi Nicole,

           

          One option which meets most of your requirements is the snapshot link feature that was introduced in FileMaker Pro v11:

           

          http://help.filemaker.com/app/answers/detail/a_id/7559/

           

          Whilst it creates a file that is stored outside of FileMaker it would allow you to build up a collection of a different found sets of records with different sort orders, active records etc all without any additional development.

           

          If you wish to have this functionality included within your database you'll have to setup a system that captures the IDs/primary keys of the found set of records, the current sort order, the active record etc and store this information in a table along with a description etc. Scripts would handle the storing and restoring of the found sets - I'll see if I can locate some sample files that demonstrate this. If you search the archive you might also find some references to this as I'm sure this has come up before.

           

          HTH,

          Andrew

           

          FileMaker 8/9/10/11 Certified Developer

          Databuzz

          - - - - - - - - - - - - - - - - -

          Phone: +61 2 9484 6565

          Mobile: +61 418 468 103

          Email: andrew@databuzz.com.au

          Web: www.databuzz.com.au

          • 2. Re: How to create a marked record within a found set in multi-user environment?
            MicheleOlson

            Take a look at the excellent Find Log System demo, created and shared by Ray Colognon of Nightwing Enterprises.

             

            You can find it at his website:

             

            http://www.nightwing.com.au/FileMaker/

             

            Scroll down and look for the "949" section.

             

            HTH,

             

            Michele

            • 3. Re: How to create a marked record within a found set in multi-user environment?
              CarstenLevin

              Hi Nicole,

               

              There may be some much much simpler solutions to your problem. Therefore I think you should describe the use case (what are you doing and what do your people need to achieve), not tecnically but a description of the work you are doing. But I will try to answer your question, just remember that FileMaker has some strong features like storing the users own searches etc. ets.

              If you describe the needs, we may be able to come op with very very easy solutions:-)

               

              I need to be able to make a marked record within a found set for each user. The user needs to be able to make multiple found sets with marked records. They would have to have a related description to be able to make it easier to find when trying to go back. The user would only see his/her marked records, unless they would wish to share with another user. The found set needs to be remembered in the sort order that the user created with the marked record in the same location in the found set when recalled. The users do not want to open a separate window with the found set and they need to be able to come back to this set at a later date. Could be hours, days, weeks, or months later.

               

              As I see it there is only one good solution:

              You ned this before proceding:

              • A table with a record for each user. Probably always a good idea for other reasons as well.
              • A new table to establish your sets. This table should have the normal set of keys and standard fields + a foreign key to the user, a foreign key to the record, a key for each set, sort order number and a field to enter the description into.

               

              Now, when the user has done a find he/she will press a button to store the find. Then a related record will be stored for each record in the found set. You will set the key to the persons card as well and the sort key and the the key for the set (the same for all in this stored find) and you can let the user write all the comments he or she want.

              Alternatively you can do the same with one record i your new table. Utilizing the fact that FileMaker allows for multiple keys to be set in one field. If you only want one comment for each set, this will work. If you want to be able to have a comment for each record in the set you need to use the full set.

               

              BUT I AM STILL ASKING THE QUESTION: What business purpose do you want to achieve. It is still very much possible that there are much simpler solutions.

               

              I will also send this issue to my friend Claus Lavendt. He has build in some nice stored search procedures for each user en some of the solutions we are delivering.

               

              Best regards

               

              Carsten Levin

               

              Ps. You also write The users do not want to open a separate window with the found set ... thats easy to achieve, as long as you do not include the order to open a new window in the script you will stay in the same window. But if you do not open the set in a new window the user will loose his/her focus when getting the set and will have to remember where he was afterwards. But it may of course be logical in your business' and its workflow.

              • 4. Re: How to create a marked record within a found set in multi-user environment?
                RayCologon

                Nicole wrote:

                ...The found set has 321 records. The specific marked record is number 206 in the sort order that the user is seeing. The user wants to be able to mark their record '206' and save the found set. Some time goes by and the user wishes to revisit their work on this found set. When they perform an action? they are taken to the same set of records with current database information. 321 records in the same sort order with what was record 1 equal to the current record 1 and their record 206 equal to the old record 206...

                 

                Hi Nicole,

                 

                The methods Andrew and Michelle have suggested certainly address part of the requirement you've outlined, but a couple of things you mention in the last paragraph (above) go beyond what either method will do on its own.

                 

                One issue you should be aware of is that regardless of the method you use, if a record has been deleted (between when the user first establishes the found set and marks some records) it won't be present when they return to view the set again at a later date. So in regard to your example, if, say, records 17 and 150 from the original group of 321 have since been deleted, the group will come back as only 319 records and what was marked as record 206 will now appear 204th among the set of 319.

                 

                That said, the stored find method might be of interest to you, but as shown in the demo, it doesn't make provision for storing the sort order or storing one or more marked records (I daresay the technique could be extended in those ways...). But another issue that you would need to consider is that the technique re-applies the original search criteria, which may produce a different result if the data has changed in the interim (some edited records that were part of the original result may no longer meet the search criteria, while others that either didn't exist at the time of the original search, or that have been edited, may now be included). Moreover the technique captures and reapplies find criteria only, it doesn't take account of whether any records have subsequently been manually omitted etc. These issues are likely to apply equally to any approach based on stored searches.

                 

                If the issues I've outlined are problematic for you, you may get closer to where you want to be by following Andrew's snapshot links suggestion - however you would need to create a mechanism (eg via script) for storing the snapshot link files. This could be done by uploading them (using the Insert File[ ] script command) into a container field in a SavedSets table of user record sets. You'd then need a script that used the Export Field Contents[ ] command to export and open the relevant .fpsl file. This approach would, however show the resulting set of records in a new window, though you could use some additional script commands to close the original window and apply its size, placement and name to the new window, creating the illusion that the reinstated set has opened in the same window.

                 

                In either case, you will need an to add a method for marking records within the sets - and the method will need to be specific to the current user. For this, I suggest you store the IDs (primary key or serial number) of marked records in a global text field, then add a conditionally formatted element to the body part of the layout, using a formula along the lines of:

                 

                PatternCount(¶ & YourGlobalField & ¶; ¶ & RecordID & ¶)

                 

                Because global field values are specific to the user in a hosted solution, each user will see their own marked records and you will avoid conflicts with other users. Moreover, you can transfer the contents of the global field to a MarkedRecords text field within in the relevant record in the SavedSets table, alongside the .fpsl file (snapshot link), and then have the script that restores a set write the value from the SavedSets::MarkedRecords field in the relevant record to the global field, to restore the record marking for the set. All doable, certainly, but perhaps somewhat daunting to contemplate, given that you're fairly new to FileMaker and/or scripting.

                 

                Regards,

                Ray

                ------------------------------------------------

                R J Cologon, Ph.D.

                FileMaker Certified Developer

                Author, FileMaker Pro 10 Bible

                NightWing Enterprises, Melbourne, Australia

                Email: cologon@nightwingenterprises.com

                http://www.nightwingenterprises.com

                ------------------------------------------------

                1 of 1 people found this helpful
                • 5. Re: How to create a marked record within a found set in multi-user environment?
                  Nicole

                  Thank you Andrew, Michele, Carsten, and Ray for your well thought out answers and speedy reply.

                   

                   

                  To answer Carsten's question regarding the business purpose that I wish to achieve.

                   

                  The users are all part of different departments and will be using the marked records in different ways. However, they can boil down to a simple scenario. The user is doing some research/ work within a found set. They have marked one or more records. The user is on a specific record within that found set. They are interrupted (can be phone call, another hot project, etc.) and they need to quickly leave the current record in the found set and do this other task. They do not wish to lose their place in the project they were working on previously, nor the thought process they were currently in. (As much as possible.) When they have the opportunity to return to the project they would like to be able to start at the same place they left off. With the reminder of what the purpose and thought process was at the point of departure. They would need to be able to start from the record that was on screen when the interruption occurred and go forward or backward through the found set from the record as needed.

                   

                  I hope this enough of an explanation.

                   

                  As Ray pointed out,

                   

                  "One issue you should be aware of is that regardless of the method you use, if a record has been deleted (between when the user first establishes the found set and marks some records) it won't be present when they return to view the set again at a later date. So in regard to your example, if, say, records 17 and 150 from the original group of 321 have since been deleted, the group will come back as only 319 records and what was marked as record 206 will now appear 204th among the set of 319."

                   

                  Deletion is a concern for some of the research projects. But sounds as if it is an inescapable fact. If the record no longer exists, than there would be no way to display it.

                   

                  Reapplying the original search criteria and possibly returning a different found set, due to a change in the information would be acceptable to Sales and Marketing, but Research would not like to have the found set changed until they ran a new search.

                   

                  Thank you all for your help. You have given me a lot to think about and learn.

                  Nicole

                  • 6. Re: How to create a marked record within a found set in multi-user environment?
                    RayCologon

                    Nicole wrote:

                    ...Deletion is a concern for some of the research projects. But sounds as if it is an inescapable fact. If the record no longer exists, than there would be no way to display it.

                     

                    Reapplying the original search criteria and possibly returning a different found set, due to a change in the information would be acceptable to Sales and Marketing, but Research would not like to have the found set changed until they ran a new search.

                     

                    Hi Nicole,

                     

                    Certainly, the absence of deleted records is an inescapable fact if users are viewing current data.

                     

                    If it's a requirement for the Research people to view historical data - ie a view of data preserved from a given instant in time, then none of the methods discussed so far here would do. Instead, you'd need to provide a method of archiving and recalling data sets - in a way that would preserve the state of the data at the time when the set was created.

                     

                    That's certainly possible, but will produce quite different outcomes from simply viewing the current state of the corresponding records (those that still exist) or re-running a previous search. Users would need to be accutely aware that they were viewing historical data. But, with that said, a way of doing this would be to have a script import the set data into a utility "holding" table, along with userID, time-stamp, setID and record mark data. Then the complete data from a given set will be able to be recalled and viewed at will, with all its original content preserved. Moreover, each user will have independent set records in the utility table, so conflicts will be avoided.

                     

                    Regards,

                    Ray

                    ------------------------------------------------

                    R J Cologon, Ph.D.

                    FileMaker Certified Developer

                    Author, FileMaker Pro 10 Bible

                    NightWing Enterprises, Melbourne, Australia

                    http://www.nightwingenterprises.com

                    ------------------------------------------------

                    • 7. Re: How to create a marked record within a found set in multi-user environment?
                      Nicole

                      Hello Ray,

                       

                      Would it be possible to give the user the choice of using historical data "this exact moment in history" or using the found set, but with the data as it is currently in the database?

                       

                      I imagine it could be done at the point of creation. Give the user the choice of option A - historical data or option B - the found set with current data. However, I can see some oops moments when the user would say I chose A but I need B or the other way around. Could there be a method to allow either choice at the point of recalling the set?

                       

                      Thank you for you help and insights.

                      Nicole

                      • 8. Re: How to create a marked record within a found set in multi-user environment?
                        RayCologon

                        Nicole wrote:

                        Would it be possible to give the user the choice of using historical data "this exact moment in history" or using the found set, but with the data as it is currently in the database?

                         

                        I imagine it could be done at the point of creation. Give the user the choice of option A - historical data or option B - the found set with current data. However, I can see some oops moments when the user would say I chose A but I need B or the other way around. Could there be a method to allow either choice at the point of recalling the set?

                         

                         

                        Hi Nicole,

                         

                        Yes, that would be possible - though it would mean essentially implementing two methods plus a mechanism for switching between result sets, so it would entail some additional work.

                         

                        There's also a chance that having both choices will be confusing for users - at the very least, the distinction between the A and B "set models" would need to be well understood by users in order for them to make effective choices.

                         

                        Perhaps a way to (slightly) simplify the choice aspect would be to have the behavior (A or B) configurable as a user preference, so they can change it if they want, but otherwise it always defaults to the selected (preference) option for a given user. Just a thought.

                         

                        Regards,

                        Ray

                        ------------------------------------------------

                        R J Cologon, Ph.D.

                        FileMaker Certified Developer

                        Author, FileMaker Pro 10 Bible

                        NightWing Enterprises, Melbourne, Australia

                        http://www.nightwingenterprises.com

                        ------------------------------------------------

                        1 of 1 people found this helpful
                        • 9. Re: How to create a marked record within a found set in multi-user environment?
                          Nicole

                          Hello Ray,

                           

                          Ray wrote:

                           

                          Perhaps a way to (slightly) simplify the choice aspect would be to have the behavior (A or B) configurable as a user preference, so they can change it if they want, but otherwise it always defaults to the selected (preference) option for a given user. Just a thought.

                           

                           

                          Once the user is trained on the differences, a user preference sounds like the way to go. How do I go about planning and setting this up. What types of tables, scripts, etc. do I need? Is there any particular reference that I should be reading to understand the concept in full?

                           

                          Thank you for time and help,

                          Nicole

                          • 10. Re: How to create a marked record within a found set in multi-user environment?
                            RayCologon

                            Nicole wrote:

                            What types of tables, scripts, etc. do I need? Is there any particular reference that I should be reading to understand the concept in full?

                             

                            Hi Nicole,

                             

                            Essentially, you'll need a Users table - with one record per user based on their login account, and you'll need to access the relevant user record when the user logs in. Usually this is done by placing the account name into a global field to instantiate a relationship to the corresponding user record.

                             

                            Then, in the user record, you can store a variety of user-specific data including user preferences of the kind discussed here. With the relevant table, fields and relationships in place, you will then be able to set up your scripts to branch (ie using If[ ]/Else/End If commands) according to the preference state for the current user.

                             

                            Meanwhile, if you're interested, you'll find some info on this and related concepts covered in Chapter 10 of the FM10 book mentioned in my signature block.

                             

                            Regards,

                            Ray

                            ------------------------------------------------

                            R J Cologon, Ph.D.

                            FileMaker Certified Developer

                            Author, FileMaker Pro 10 Bible

                            NightWing Enterprises, Melbourne, Australia

                            http://www.nightwingenterprises.com

                            ------------------------------------------------

                            • 11. Re: How to create a marked record within a found set in multi-user environment?
                              Nicole

                              Thank you Ray,

                               

                              Ray Cologon wrote:

                               

                              Meanwhile, if you're interested, you'll find some info on this and related concepts covered in Chapter 10 of the FM10 book mentioned in my signature block.

                               

                              Regards,

                              Ray

                              ------------------------------------------------

                              R J Cologon, Ph.D.

                              FileMaker Certified Developer

                              Author, FileMaker Pro 10 Bible

                              NightWing Enterprises, Melbourne, Australia

                              http://www.nightwingenterprises.com

                              ------------------------------------------------

                               

                               

                              I purchased your book and Susan Prosser's and Bob Bowers' books while I was at it. I am sure I will have more questions, but I am going to study the material first to see if I can limit them.

                               

                              Nicole