1 2 Previous Next 21 Replies Latest reply on Dec 17, 2011 12:49 AM by db49er

    Display multiple records from single table

    db49er

      Title

      Display multiple records from single table

      Post

      I have spent many days trawling the web for the solution to, what seems to be, a very simple task but without success.

      I have one table containing several hundred records of Name and Contact details. I want to be able to select any ten of these records, at random, and display them in rows on a form which I can then publish as a single PDF page. So far, I have only managed to display the same record ten times!!!! I am new to FileMaker but have achieved more complicated tasks in other databases.

      Thank you.

        • 1. Re: Display multiple records from single table
          Sorbsbuster

          You want to display the records in List View.  In layout mode set the Name and Contact details field in the Body section, just below the Header.  Slide the Body section up to remove any space below the fields.  In the Layout Menu choose Layout set up - Views - List view.

          Return to Browse mode and make sure that in the View menu 'View as list' is selected.

          In the Records menu choose Show ALl Records.  You should now be looking at a list of all the records.  You can print them as a pdf.

          Although I am missing something else if you are seeing a list of the same record, on the same screen (page), listed 10 times.

          • 2. Re: Display multiple records from single table
            db49er

            I have designed a form which has ten rows to accept the data. I want to be able to select between one and ten names, of my choosing, to populate the rows i.e. scroll through the names in row one until I find the one I want, select it and move to row two and repeat etc. etc.

            • 3. Re: Display multiple records from single table
              Sorbsbuster

              There are ways of doing that, of course.  You could set up 10 fields of choices with a pop-up in each with the list of names.  These fields would be global, and distinct from the fields of data for the 100s of Names and Contacts.

              But why do you not just do a 'Find' for the 10 records you want to print?

              • 4. Re: Display multiple records from single table
                db49er

                Thank you very much for your replies.  i am open to any suggestions. Perhaps it may clarify the situation if I describe how i do it now.

                I have to complete this form evry day and forward it by e-mail. Most of the time it is the same three or four people and I just need to change dates and a couple of other items. The form is a Word document and the list of names is in an Excel spreadsheet. At the moment I cut and paste names and details (there are six fields associated with each name) from the spreadsheet to the document, as required. There are many same family names so I need to identify the individual to make sure I have the correct one. I am just trying to automate the task, somewhat, but perhaps I am trying to do something that FM is not really suited to?

                • 5. Re: Display multiple records from single table
                  philmodjunk

                  Yes, but what makes this a random selection like you have described?

                  If you have one record for each contact (just like one row for each in the spread sheet), you can perform a find or do a show all records if you want to see all the contacts and then you can use omit record to drop out the records you don't want--until you get the 10 records you want to send out.

                  (PS. if you really want to pick records at random, you can use a number field or calculation field in the table to assign it a random number then sort by this field--keeping the first 10 records to sort to the top of the list.)

                  • 6. Re: Display multiple records from single table
                    db49er

                    Sorry, "random" is an inaccurate description of what I am trying to do. I had hoped to use a drop-down box with the "type ahead" facility to select the required record but, clearly, what I thought was simple is, in fact, too difficult.  I will put FM back in its box and stick with cut and paste.

                    Thank you.

                    • 7. Re: Display multiple records from single table
                      Sorbsbuster

                      I wouldn't say it was difficult to Cntrl+F and use type-ahead to pick the name you want from a pop-up list.

                      • 8. Re: Display multiple records from single table
                        philmodjunk

                        In fact there are a number of different ways to set this up--some very simple--others more sophisticated to better handle large data sets with duplicate entries. What we've been requesting is a sufficiently detailed description of exactly what you want to do so that we can suggest a method that will do what you need.

                        • 9. Re: Display multiple records from single table
                          mgores

                          If you want to just print of list of 10 contacts to look like this

                          First Last  Address City, State Zip   // or whatever details you want

                          You can add a calculation field to show the other fields in the order you want.

                          Create a value list set up to use that calculated field

                          Create a layout using 10 global fields in rows how you want them to look.

                          Then make each of the global fields autocomplete from the value list, so that as you start typing the name in the list will diminish until you can select the one you want.  The global field will then have that contact info in it and you can do the same thing for each of the other rows until your done.  Then you can print it, clear the globals and make the next list if you need to.

                          • 10. Re: Display multiple records from single table
                            db49er

                            Thank you Mark, that works very well except for one thing.  I have six fields per row and the first field returns "?" whereas 2 through 6 all return correctly.  I have checked and changed the syntax in the calculated field many times but cannot solve the problem.

                            • 11. Re: Display multiple records from single table
                              philmodjunk

                              What do you see when you click into that field?

                              The ? just means that FileMaker can't display the data. Sometimes, all you have to do is resize the field to make it wider. If that is the case, you should see the full value when you click or tab into the field.

                              Other times, this tells you that the data in this field is invalid such as a date field that can't display an invalid date or a calculation that divides by zero...

                              • 12. Re: Display multiple records from single table
                                db49er

                                It is always the first field displayed in the global field on the layout.  I can change the order of fields around in the calculation, it is just the first one which returns "?".  I know it is not easy diagnose the problem from a distance but any suggestions will be gratefully received.

                                • 13. Re: Display multiple records from single table
                                  philmodjunk

                                  Please answer the question: What do you see if you click in the field that shows the "?" ?

                                  • 14. Re: Display multiple records from single table
                                    db49er

                                    The global field on the layout displays data from six fields, derived from a calculation using a value list as its source.  If I click in the global field I see "?" followed by five correct items of data.

                                    1 2 Previous Next