4 Replies Latest reply on Nov 8, 2012 1:15 PM by philmodjunk

    2 - Problems with subsubaries

    Kirk_1

      Title

      2 - Problems with subsubaries

      Post

           Ive created a layout in list view that has a header, body and footer.

           I needed to create a report... most of the info was in this layout so i copied it, added the fields i needed and changed the body to a subsumary. The data does not show up... its there because the total fields in the footer calculate properly. if i switch it to a body again it show up.

           Why? How do i get it show the info when i change it to a subsumary?

           Next, i have a look up that i do in this same layout, based on a date. With my debugger, i can see that it puts the date in the correct field. I get the error that the look up can't be found.

           I can put the same date in the exact same way, in the look up field by hand and it works.

           What am i doing wrong?

        • 1. Re: 2 - Problems with subsubaries
          Kirk_1

               I figured out the issue with the visibility.

                

               Any help on the find?

          • 2. Re: 2 - Problems with subsubaries
            philmodjunk

                 You should get the same results from a manual find as from a scripted find. I suggest posting your script.

                 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 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.
            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. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
            • 3. Re: 2 - Problems with subsubaries
              Kirk_1

                   I do a found set to get into the layout, if its negative i go into find mode...

                   So.. this script is enacted with find mode already on.

                   Its a script trigger "on object exit" run the script...

                   I have a drop down calender box call INSearchPostDate that is where Ive set the value from and where the script trigger is.

                   (I don't know how to make it a date range combining the INSearchPostDate and INSearchDate1, so Ive disabled the INSearchDate1 for the ending date fields. If you can offer advice on that as well I'd appreciate it.)

                   I'm trying to set the posted date... and can do it maunally... with the debugger i can see it setting the date in the field.

                     
              •           Set Variable [ $beginDate; Value:Invoice::INSearchPostDate ]
              •      
              •           // Set Variable [ $enddate; Value:Invoice::INSearchPostDate1 ]
              •      
              •           Set Field [ Invoice::INPostedDate; $beginDate ]
              •      
              •           // If [ $enddate = "" ]
              •      
              •           Perform Find [ ]
              •      
              •           // Else
              •      
              •           // Set Field [ ]
              •      
              •           // End If

                    

              • 4. Re: 2 - Problems with subsubaries
                philmodjunk

                     I do a found set to get into the layout, if its negative i go into find mode...

                     Huh? if what's negative?

                     Make your InsearchPostDate and InSearchPostDate1 fields global fields (Open field options in Manage | Database | Fields and select global storage.)

                     Then this script will find dates in a given date range:

                     Enter Find Mode []
                     Set Field [Invoice::INPostedDate ; Invoice::InSearchPostDate & "..." & Invoices::InSearchPostDate1 ]
                     Set Error Capture [on]
                     Perform Find []

                     This is the scripted equivalent of manually:

                     Enter find mode
                     Type in first date, the ellipses (...) and the second date
                     Click Perform Find

                     The only difference being that Set Error Capture [on] keeps the "no records found" dialog from appearing if the specified date range does not find any records.

                     Oh yes, make sure that INPostedDate, InSearchPostDate and InSearchPostDate1 are all fields of type date.