7 Replies Latest reply on Jul 29, 2009 12:37 PM by TSGal

    Filemaker Pro 10 IWP Clicking on Table

    meteodave

      Title

      Filemaker Pro 10 IWP Clicking on Table

      Post

      I am converting databases from FMP6 Unlimited to FMP10 Advanced and will run them on the FM Pro 10 Server. 

       

      In FMP6 IWP, when a row is selected in a table, a form will automatically appear for this record (1 - click solution).  

       

      By default FMP10 IWP will make the table editable.  I found that restricting input into the table layout fields will restrict the table row from becoming editable and select the desired record.  However, I must switch to the form layout and edit the full record.  My customers do not want to have any extra clicks and need the similar FMP6 IWP functionality described above.

       

      Does anyone know the setting or script steps to enable the FMP 6 IWP functionality?  FMP6 only required one click and now FMP10 appears to require two mouse clicks to access the record form.

       

      Thank you in advance for your help.

       

        • 1. Re: Filemaker Pro 10 IWP Clicking on Table
          TSGal

          meteodave:

           

          Thank you for your post.

           

          FileMaker Pro 10 allows you to enter information into Table view.  What you can do is create a List layout that looks similar to table view.  Then, make all fields into buttons that executes the command: Go to Layout and specify the form layout.  Now, in the new layout, click on any field, and you are taken to the form view of the selected record.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Filemaker Pro 10 IWP Clicking on Table
            meteodave
              

            TSGal  - Thank you for your response. 

             

            Yes, the functionality now resembles FMP6, however, I can only display 25 rows.  My customers use the table/list area as a quicklook into the database status and need at least 50 (preferably more, although it appears to be a limitation according to the documentation).  They would rather scroll down the page rather than click to the next group of records.  FMP6 would allow me to craft a link that set the actual number of rows displayed in the web browser.  Is a similar capability available in FMP10? 

             

            Do you know any work arounds (e.g., using the portal) or if there is a possibility Filemaker will increase the number of viewable rows in the table or list?

             

            Thank you again for your help.

            • 3. Re: Filemaker Pro 10 IWP Clicking on Table
              TSGal

              meteodave:

               

              The maximum number of records that can be shown at one time in Instant Web Publishing is 25 rows.  No function will increase this number.

               

              One possibility is to create a second table that displays two or more records in a single field separated by returns.  Then, you could have five buttons in the one record to take you to five different records.  Therefore, the 25 records would signify 125 records.  It is a bit convoluted, but it is possible.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Filemaker Pro 10 IWP Clicking on Table
                meteodave
                  

                TSGal:

                 

                I have created a list that shows four records in one list record.  I needed to create four new fields for each data field.  For example, the Date field has the following four calculation fields:

                 

                1st row

                If(GetNthRecord (Date;Get(RecordNumber)*4-3)<=Get ( FoundCount );GetNthRecord ( Date;Get(RecordNumber)*4-3);"")

                2nd row

                If(GetNthRecord (Date;Get(RecordNumber)*4-2)<=Get ( FoundCount );GetNthRecord ( Date;Get(RecordNumber)*4-2);"")

                3rd row

                If(GetNthRecord (Date;Get(RecordNumber)*4-1)<=Get ( FoundCount );GetNthRecord ( Date;Get(RecordNumber)*4-1);"")

                4th row

                If(GetNthRecord (Date;Get(RecordNumber)*4)<=Get ( FoundCount );GetNthRecord ( Date;Get(RecordNumber)*4);"")

                 

                Is this the best way?

                 

                However, when I create the form buttons for each of the record fields, the button takes me to the first record in the group or sometimes to another record outside the group.  I am also trying to run the list using the Found Records.  Do you have the button script code that takes the user to the correct record form view when clicking each row in the list?

                 

                Thank you again.

                • 5. Re: Filemaker Pro 10 IWP Clicking on Table
                  TSGal

                  meteodave:

                   

                  You are very close with your calculations.

                   

                  1st field:

                  If ( ( Get ( RecordNumber ) * 4 - 3 ) <= Get ( FoundCount ) ; GetNthRecord ( Date ; Get ( RecordNumber ) * 4 - 3 ) ; "" )

                   

                  2nd field:

                  If ( ( Get ( RecordNumber ) * 4 - 2 ) <= Get ( FoundCount ) ; GetNthRecord ( Date ; Get ( RecordNumber ) * 4 - 2 ) ; "" )

                   

                  3rd field:

                  If ( ( Get ( RecordNumber ) * 4 - 1 ) <= Get ( FoundCount ) ; GetNthRecord ( Date ; Get ( RecordNumber ) * 4 - 1 ) ; "" )

                   

                  4th field:

                  If ( ( Get ( RecordNumber ) * 4 ) <= Get ( FoundCount ) ; GetNthRecord ( Date ; Get ( RecordNumber ) * 4 ) ; "" )

                   

                   

                  That is, check to see if the record in the found set times 4 minus three is less than or equal to the found set of records.  If so, then display that information.

                   

                  Now, create four scripts, because we need to go to the correct record and switch to the correct layout.

                   

                  Script 1:

                  Store Variable [ $rec ; Get ( RecordNumber ) ] 

                  Go to Record/Request/Page [ Calculation: If ( ( Get ( RecordNumber ) * 4 - 3 ) <= Get ( FoundCount) ; Get ( RecordNumber ) * 4 - 3 ; Get ( RecordNumber) )

                  If [ $rec <> Get ( Record Number ) ] 

                     Go to Layout [ <layout for editing> ] 

                  End If 

                   

                  Script 2:

                  Store Variable [ $rec ; Get ( RecordNumber ) ] 

                  Go to Record/Request/Page [ Calculation: If ( ( Get ( RecordNumber ) * 4 - 2 ) <= Get ( FoundCount) ; Get ( RecordNumber ) * 4 - 2 ; Get ( RecordNumber) )

                  If [ $rec <> Get ( Record Number ) ] 

                     Go to Layout [ <layout for editing> ] 

                  End If 

                   

                  Script 3: 

                   

                  Store Variable [ $rec ; Get ( RecordNumber ) ] 

                  Go to Record/Request/Page [ Calculation: If ( ( Get ( RecordNumber ) * 4 - 1 ) <= Get ( FoundCount) ; Get ( RecordNumber ) * 4 - 1 ; Get ( RecordNumber) )

                  If [ $rec <> Get ( Record Number ) ] 

                     Go to Layout [ <layout for editing> ] 

                  End If 

                   

                  Script 4:

                  Store Variable [ $rec ; Get ( RecordNumber ) ] 

                  Go to Record/Request/Page [ Calculation: If ( ( Get ( RecordNumber ) * 4 ) <= Get ( FoundCount) ; Get ( RecordNumber ) * 4 ; Get ( RecordNumber) )

                  If [ $rec <> Get ( Record Number ) ] 

                     Go to Layout [ <layout for editing> ] 

                  End If 

                   

                   

                  Now, for each of your four extra fields, make these a button and attach the appropriate script to each field.

                   

                  This will:

                  1. take you to the appropriate record when clicked

                  2. work properly for any found set

                  3. For records that don't display information in the four fields, nothing happens

                   

                  This should get you started.

                   

                  TSGal

                  FileMaker, Inc. 

                   

                  • 6. Re: Filemaker Pro 10 IWP Clicking on Table
                    meteodave
                      

                    TSGal:

                    Thank you very much for your input.  I have implemented the recommended steps and have everything working except for the first record button to go to the form.

                     

                    For the first button script, I used the script debugger to watch the $rec variable when I click on the button.  The script proceeds until the If statement If[$rec <> Get(RecordNumber)] and does not perform the command.  I captured the Get(RecordNumber) value in a variable $rec2 and confirmed that both $rec and $rec2 have values of 1.  As a workaround, I added the following statement to the If condition in first button script:

                    If [($rec ≠ $rec2)  or ($rec = 1 and $rec2 = 1)]

                     

                    I think this is correct, but let me know if you have a better solution.

                     

                    I have implemented everything else and it seems to work.

                     

                    • 7. Re: Filemaker Pro 10 IWP Clicking on Table
                      TSGal

                      meteodave: 

                       

                      Oops...  Good catch, and good solution.  Since this is the only exception, I can't think of a better solution.

                       

                      TSGal

                      FileMaker, Inc.