8 Replies Latest reply on May 1, 2012 7:59 PM by Hudi

    File reference in IWP

    Hudi

      I have a Global table with one record and a constant unstored calc (Globals::_uc_1) field which is the key field referencing an external filemaker database. Portal works fine on the client but not in IWP. I have run into this before and it was an issue of security settings. I needed to have both databases IWP enabled as well as the same account enabled with IWP. I have tested for that but it still does not show. Any other ideas?

       

      I can send the files, they are both very small clones.

       

      Thanks!!

        • 1. Re: File reference in IWP
          Stephen Huston

          Portal refreshes in IWP are an issue. Entering a Key field value does not force a browser to refresh a portal on a web page the same way that the FileMaker app will refresh. (Even FMPro can fail to refresh portals in some cases unless you script a refresh window.)

           

          Have you tried reloading the web page via a browser button after entering the global value?

           

          Keep in mind that global values are retained from the last un-hosted single-user session when they are later placed on a server, and those values, if any, would become defaults in IWP.

          • 2. Re: File reference in IWP
            Hudi

            Stephen,

             

            thanks for the reply.

             

            I figured out why I was not getting any records. The referenced file was not open (duh). I had to open it up in IWP from the home page and then the portal was populated. Is there no way around this?

             

            How do I get the referenced file to open when user opens IWP?

            • 3. Re: File reference in IWP
              Stephen Huston

              Usually the realted file will open itself if both of these cases are met:

              1. the account name and password used to login to the file with the parent records matches an account in the file you want to open, the one containing the child/portal records, and
              2. there is some field or data on the first screen of the parent file  that reads info from the other file. This might not be happening if the parent record's key field is empty.

               

              If that second condition isn't met until someone enters a value in your global field, then you might hit the portal refresh problem before a relationship has been established.

               

              I suggest you check the relationships and be sure the key/match field on the back-end (the portal records file) is indexed; you can't have a relationship between 2 globals or two unindexed fields.

              • 4. Re: File reference in IWP
                Hudi

                What i did was create a script in the referenced file with a relogin command that sets the username/password identical to the IWP file. This script is called on file open.

                 

                I am still gettting a blank portal until I go back to the home page (IWP_home), login to the referenced file with a username password and only then does it show me the refernced data.

                 

                My question is did my relogin script not work on the IWP but just on the local client?

                 

                I have ruled out everything else because once I login in to the referenced file through the IWP home page everything works.

                 

                I really need to get this going so I really appreciate your help !

                • 5. Re: File reference in IWP
                  Stephen Huston
                  • Please post your login script -- let's see if there is a problem with it.

                   

                  Keep in mind that a relogin may  be leaving the related table logged in with a different account or an invlaid account for the related file depending on where and when its opening was triggered.

                   

                  Is there some reason you are not using the standard FileMaker credentials for a regular login instead of using a scripted relogin?

                  • 6. Re: File reference in IWP
                    Hudi

                    The relogin script is just one script step [ relogin Account:"admin"] and no password (there is no password for admin in the database).

                    I would manually login but this solution is for a client and I dont want them to go to the related DB, just see the data in a portal. plus its a pain to open a second database when there is no need.

                    I feel like I'm missing something and its very small like maybe I need to relogin in the IWP Database with admin or something like that.

                     

                    thanks for your generous help sir.

                    • 7. Re: File reference in IWP
                      AlanStirling

                      I think I recall that the 'Re-Login' script step is not available with IWP - which would be your problem!

                       

                      You may have to put all the IWP account details into your second file as well.

                       

                      Best wishes - Alan Stirling, London, UK.

                       

                       

                       

                       

                      Alan Stirling Technology Ltd, 135 Lisson Grove, London NW1 6UP

                      +44 (0) 20 7724 2456 - alan@ast.fm - www.ast.fm

                      FileMaker Pro Developer - Certified for FM versions: 7 to 11.

                      • 8. Re: File reference in IWP
                        Hudi

                        In an attempt for some closure here's what happenend. I had the order of the accounts wrong in the referenced file. In order for Fm to "see" a referenced file in IWP, both Databases need to be enabled and the accounts need to be lined up. So if you have Username:Admin ; Password:123 and in the other file the same account, to ensure there is no issue put them both on top in the dialogue box. that soved my issue with referenced files in IWP.

                        A word to the wise (not from me , but from my friend Rick Aguirre) when creating a DB in IWP, start from scratch. If starting form a template like I did, get rid of all unecessary accounts, scripts, layout objects etc. as these will undoubtedly cause problems and then you have to spend time trouble shooting and pulling your hair out. keep your hair, start from scratch.

                        god bless