13 Replies Latest reply on Jan 17, 2015 2:38 PM by philmodjunk

    Performing find within a portal

    AOSWIS

      Title

      Performing find within a portal

      Post

      I am running FMP12 and have a scrolling portal of data within each record of the layout.  There are several fields of data in each row of the portal. The data in the portal table is linked to other tables within the record with a unique ID # and each row of data within the field carries this unique number. How does one perform a find inclusive of all data of a similar field within the portal amongst all records that utilize this portal. Every time I search all records for a particular set of data within a field of that portal it will only return those that may be contained in the first row and will not return records if the queried data happens to be in the second, third, fourth,etc row.

        • 1. Re: Performing find within a portal
          philmodjunk

          Can you provide a more detailed description of the relationships involved, the criteria you are using and how you are specifying it as well as an example of the results produced?

          This following observation may help:

          When you enter find mode and specify criteria in a field from a related table--which may or may not be a field in a portal, you are telling FileMaker to find records in the layout's table that have at least one related record satisfying the specified criteria. Once the find is returned and the layout returns to browse mode, every record in the found set then shows all related records in this portal--including those related records that do not match the specified criteria.

          • 2. Re: Performing find within a portal
            guy@guym.com

            One way (brute force) is to use a global search field in a popup or dialog,,,

            then go to the required table and find

            then set the relationship to Yes (or whatever)

            Then go back to the portal view

            • 3. Re: Performing find within a portal
              AOSWIS

              First image = relationships

              2/3/4 images represent records with portal of interest upper right, field of interest ="location segment"

              If I were to perform a search of these three records looking to find "11" in field "location segment" my results only returned for "john doe"and "jane doe" but NOT "john smith"

               

              • 4. Re: Performing find within a portal
                AOSWIS
                /files/d688f991ee/Screen_Shot_2015-01-12_at_2.50.33_PM.png 2512x1350
                • 5. Re: Performing find within a portal
                  AOSWIS
                  /files/75879b0f45/Screen_Shot_2015-01-12_at_2.51.01_PM.png 2474x1362
                  • 6. Re: Performing find within a portal
                    AOSWIS
                    /files/705bc57725/Screen_Shot_2015-01-12_at_2.51.33_PM.png 2414x1410
                    • 7. Re: Performing find within a portal
                      guy@guym.com

                      Noted that Smith does not have 11 in first portal row... What happens when you manually go to the table and search for 11?

                      • 8. Re: Performing find within a portal
                        AOSWIS

                        Thanks for quick response I believe what may have happened was occasional inclusion of an omit command for one field which if present would potentially leave out entire record if that omission was ANYWHERE in table. I suppose it would be to complex to find a way to create a find sequence that would include or omit certain fields of same row (such as "11" in this example) and would not be effected by same value contained in another row

                         

                        • 9. Re: Performing find within a portal
                          philmodjunk

                          It's a bit hard to say when there is still so much info lacking.

                          Presumably, your layout is based on the Fracture Main Table occurrence shown in your layout graph. And the portal refers to the OTA table occurrence. But while that's what this looks like, this may not be the case, so please confirm that interpretation of your design.

                          Then there is some character immediately following the second 11 in the field. What character? Is this a field of type number or type text? (either might work but this detail can make a difference in your results).

                          And exactly how are you setting up the criteria and performing this find? If this is a script, it would help to post that script and, if necessary, open the perform find script step dialog and show the criteria specified (unless you use the better approach of entering find mode and using set field steps to set up the find.)

                          To post a script to the forum:

                                 
                          1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
                          2.      
                          3. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
                          4.      
                          5. If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                          6.      
                          7. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
                          • 10. Re: Performing find within a portal
                            AOSWIS

                            Sorry for delay

                            your first assumption is correct

                            the character after 11 is text field but input is is in form of a letter combined with number (i.e. "A3" or "C2")

                            it is not a script

                             

                            • 11. Re: Performing find within a portal
                              philmodjunk

                              Then I repeat this question:

                              And exactly how are you setting up the criteria and performing this find?

                              • 12. Re: Performing find within a portal
                                AOSWIS

                                If I were to look for all "11," would use find "11."  The field closed/open  contains options "closed, I,II, IIIA, IIIB, IIIC". If I want to find all 11 but eliminate all "closed" but include "I,II,IIIA,IIIB,IIIC" I'm assuming if using new request and omit all closed it would potentially omit some of the "11" and "I,II,IIIA,IIIB or IIIC" records  because the data in the portal for a record may have a separate row of data in which for example one row contains "21" associated with "closed" and a second row of data with "11" and "IIIA"....can I use booleans to link my query

                                • 13. Re: Performing find within a portal
                                  philmodjunk

                                  The details are important here, step by step, character by character. Searching using the following different criteria options separated by commas: "11.", "11", 11, 11., 11* all might be used and might produce different results depending on the data type of the field and the values in the different records of this table. The quotes are part of the criteria in my listed possible examples. Note that I cannot tell from your post exactly which of the first 4 options were specified by you.

                                  But yes, if you specify an Omit request to Omit records from the layout's found set that have at least one related record where the field in open/closed is closed, you would, potentially, omit records where the data in the portal are not closed if another record in the same portal does have that value.

                                  This really sounds like you are performing your find on a layout based on the wrong table. I'd carefully consider whether you can better find the records you are looking for by performing the find with this criteria on a layout based on the portal's table. You might then use Go to Related records with the show only related records and match found set options specified to then pull up the desired found set of parent records.

                                  PS: Don't quite understand what you mean by "can I use Booleans to link my query".