14 Replies Latest reply on Sep 10, 2013 10:49 PM by AnnieHsieh

    Portal won't work

    AnnieHsieh

      Title

      Portal won't work

      Post

           I don't know what happened but the portal on my db won't work anymore. When I click "add this constraint" it wouldn't add anything but create a new record. It used to work (the one on the right)

      All_ScreenShot.png

        • 1. Re: Portal won't work
          davidanders

               Looks like Mac - OSX ver?  - recent update?  FMP ver?

               What have you changed since the problem appeared? Do you keep sequential backups?

               If you open a backup, save as clone, open clone, does it work?

          • 2. Re: Portal won't work
            AnnieHsieh

                 Yes I'm using a Filemaker Pro 12 Mac version. the one that worked was version 7. I'm not sure if I've accidentally did something to the db so it doesn't work anymore. What do you mean save as clone?

            • 3. Re: Portal won't work
              philmodjunk

                   I would guess that clicking that button performs a script. Please post that script so we can see which method it uses to add a record to the portal's table.

                   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. (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.
              • 4. Re: Portal won't work
                AnnieHsieh

                     I've checked but the script are the same for the two versions. I don't know why the portal on the fmp12 doesn't work anymore. here's the screenshot of the script

                      

                • 5. Re: Portal won't work
                  AnnieHsieh

                       I was checking and trying to find out where the problem was and I found this. I don't know if it's related but when I try to click on the drop down list on a record that didn't contain any information (the one on left), it wouldn't let me to edit. It only allows editing or clicking on the drop down menu if that record has something in it originally. (the one on the right)  

                  • 6. Re: Portal won't work
                    philmodjunk

                         That doesn't look like a script for adding a new record in the portal.

                    • 7. Re: Portal won't work
                      AnnieHsieh

                           what do you mean? is there another script that's doing that?

                      • 8. Re: Portal won't work
                        AnnieHsieh

                             Hey Phil, 

                             This is a problem report I made. let me know if you have any clue

                             Thanks so much for helping!

                              

                             Availability Portal in Volunteer Details doesn’t work

                             When click on “Add this constraint”, the results doesn’t show on the portal but create a new record.

                             ·      Two layouts seemed to be related –

                             1.     Volunteer Availability Report**

                             ü  (Looks like the problem is in here)

                             2.     Volunteer Availability

                              

                             ·      One script connected to the portal (Not the reason for creating new records)

                             ü  Didn’t change the script (the portal used to work fine)

                              

                             ·      Tested the relationship table (didn’t seem to be the issue)

                              

                             ·      Volunteer Availability Report fields are “Global Fields” **

                             ü  Doesn’t allow empty fields to be edited

                              

                             ·      In the Volunteer Availability Report a lot of fields are EMPTY**

                             ü  Could this be the issue?

                        • 9. Re: Portal won't work
                          philmodjunk

                               The script you listed does not add a new related record as far as I can tell. It is searching for records instead so it looks like the wrong script to be performed to add a "constraint" record to your portal.

                               Buttons that add a new record to a related table (such as that referenced by your portal), usually look something like this:

                               Set Variable [ $ID ; value: LayoutTableOccurrence::PrimaryKey ]
                               Go to Layout ["PortalTableOccurrence" (PortalTableOccurrence) ]
                               New Record/Request
                               Set Field [ PortalTableOccurrence::ForeignKey ; $ID ]
                               Go to Layout [original layout]

                               This script assumes the following relationship: LayoutTableOccurrence::PrimaryKey = PortalTableOccurrence::ForeignKey

                               So you would need to substitute your names for those used above.

                               I don't see any steps in your script that look anything at all like the above script.

                               Your drop down list, on the other hand, appears to be from a different layout. And may have nothing at all to do with why your button isn't working.

                          • 10. Re: Portal won't work
                            AnnieHsieh

                                 ok so I'll have to write the script similar to what you have there? is it possible that I have the script in my database already? cause it was working before. (I'm not familiar to this layout the previous worker created it before I came in)

                            • 11. Re: Portal won't work
                              philmodjunk

                                   My best guess is that the script you have posted here is not the script performed when you click the button.

                                   I suggest that you enter layout mode and double click the button. That should open button setup... for the button and you should be able to see the name of the script performed by this button click. If this is FileMaker 11 or newer, you should be able to then click the specify button to open yet another dialog and then select Edit from the gear drop down to open the script and examine.

                              • 12. Re: Portal won't work
                                AnnieHsieh

                                     I checked the button setup and that was the script though. Could it be something else?

                                • 13. Re: Portal won't work
                                  philmodjunk

                                       I took a fresh look at your script. The last part has a new record step followed by a series of set field steps. That would produce a new record in the correct table, volunteer availability.

                                       I think that I see the problem.

                                       Go to Layout ["Volunteer Availability Report" (Volunteers) ]

                                       The steps that create the new record are performed while on the above layout instead of on a layout based on the VolunteerAvailabilty table occurrence and thus you get a new record in the volunteers table and the set field steps fail to assign data to the record in the VolunteerAvailability table occurrence. Either the above script step takes you to the wrong layout or a go to layout step is missing later in the script. (it depends on what table is needed for all those restored finds and extend found sets.

                                       BTW, there's an easier way to get an empty found set than Perform Find [Restore] , Omit Multiple [9999999999999]

                                       Just perform a find using criteria that won't match to any record in your table. If you have a field with an auto-entered serial number, for example, you could perform a find for a negative value in that field. As long as Set Error Capture is enabled as it is in this script, such a find produces an empty set.

                                  • 14. Re: Portal won't work
                                    AnnieHsieh

                                         That was it !! Thanks so much Phil!