7 Replies Latest reply on Jun 18, 2012 6:29 AM by philmodjunk

    Selected records to Export

    Fagreement

      Title

      Selected records to Export

      Post

      Hi,

      I need to export some records from my database to excel. I know the functionality export Which is great but my issue is the following:

      the use perfrom a find, he will get a list of results (let's say 100 records), then he can do export. But what if, within this result he would like to exclude  (uncheck) some records, how can i do this?is there a way to check/uncheck tge records to be exported?

      thanks

        • 1. Re: Selected records to Export
          Fagreement

          I think it could be using the Omit multiple record function, but practically how can i do to let the user check the records to omit and then perform a script to omit only those checked.

          select * from [Bethgazo].[dbo].[View_eLibrary]
          where Cote = 'OLM 1'
          • 2. Re: Selected records to Export
            philmodjunk

            The SQL example you are giving is a query that pulls up a record set from the database.

            In FileMaker, a script can perform a find that updates your found set to omit the selected records. But how you enable users to omit selected records has to be done with care if two or more users might need to omit records from their found sets at the same time or User 1 might unintentially omit a record that User 2 needs to export and vice versa.

            Will this be a multi-user or single-user set up?

            • 3. Re: Selected records to Export
              Fagreement

              sorry i did a mistake, I paste something (the query) that it is not its place :)

              regarding the omit record, dor this export only one user will use the database, so non pbm from thsi side. SO ITS A SINGLE USER SET UP.

              so how can i do please?

              • 4. Re: Selected records to Export
                philmodjunk

                Option 1: You can put a button in the body of the layout (assuming that you have a list view layout). Set it in button setup to omit record. Click the button and the record disappears--omitted from the current found set.

                Option 2: Add a single value check box to the body. Users are instructued to clik the check box to omit the record.

                This script then constrains the current found set to omit all records where the "omitField" is not empty:

                Enter Find Mode [] //clear the pause
                Set Field [YourTable::omitField ; "="]
                Set Error Capture [on]
                Constrain Found Set[]

                You'll need this script to clear the check boxes when you are done:

                Enter Find Mode[]
                Set Field [YourTable::omitField ; "*"]
                Set Error Capture [on]
                Perform Find[]
                Replace Field Contents [YourTable::omitField ; "" ]

                These are the simplest methods that I can think of. A more sophisticated approach can be used that sets up the check box as a button that performs a script. The script can check to see if the shift key is down to enable users to click record 1, then shift click record 5 and the script then updates the check box fields to select records 1 - 5.

                • 5. Re: Selected records to Export
                  Fagreement

                  thanks

                  • 6. Re: Selected records to Export
                    Fagreement

                    in the scripts how can i find where a field is used.

                    I mean I have to know in whcih scripts the field X has been used.

                    • 7. Re: Selected records to Export
                      philmodjunk

                      Can you explain why you need to know this?

                      If you have FileMaker Advanced you can generate a Database Design Report and search if for references to a specified field. You can make the searh easier if you first open Manage | Database | Fields and rename the field to something very unique if your field has a generic field name such as "date".

                      I haven't used them, but I believe that there are third party products that can also be used to search scripts for specific field references.