9 Replies Latest reply on May 24, 2012 1:50 PM by rgnant_1






      I posted this last week.  Got about a dozen views, but no comments or suggestions.  As this is a key step in developing a solution for a large organization I am a member of, I thought I would try again.  Would REALLY appreciate some direction here.

      Database to be hosted on offsite server.  Most users will log into a website and be auto directed to the db.  Some users will have FM installed and will access the db directly.  All website users will enter as Guest.

      Trying to design a mechanism where IWP users can upgrade their acccounts.  The attached script works perfectly when in FM, but when usint the http://192.168.... to test IWP, the account name remains Guest.  When using Script Debugger, the script moves oer the Relogin step to reset the Login Message field, but the account name doesn't change.  Stays as guest.

      Suggestions are most welcome.


        • 1. Re: Relogin


          Thank you for your post.

          Does the script work locally?  That is, if you run a browser on the same machine the file is being hosted, does it work?  Are the fields UserNameMember, UserNameBoard or UserNameAdmin set for global storage?  Have you just tried using Re-Login script step with UserNameAttempt and PasswordAttempt?  Once you set the field, at what point do you commit/submit the changes?

          Any other information you can provide might be helpful.

          FileMaker, Inc.

          • 2. Re: Relogin

            No, the script does not work locally.  Yes, the fields are set for global storage.  I added a Commit Records step, but still no go.  My attempt at "Have you just tried using Re-Login script step with UserNameAttempt and PasswordAttempt?" is below.

            It is interesting that Script Debugger apparently likes the ReLogin line because it proceeds to the Set Field line.  Or, for some reason, it can't execute the ReLogin line.

            My thinking is that when the ReLogin line executes, FM says, "OK, whatever account this guy had before, we are changing it to the one he has submitted the user name and password for."  Right? 

            • 3. Re: Relogin


              Just a reminder, global storage fields are unique for each client.  The default value can only be set by the host computer.

              The Commit Records script step should come after you set fields in order to submit the changes in Instant Web Publishing.  Therefore, Commit Records should appear after the first End If.

              The Re-login should work (assuming the correct data is in HomePage::UserNameAttempt and HomePage::PasswordAttempt.  Once the data is committed, you may want to set a field with the account name, submit it and view it.  This will let you know if the Re-Login was successful.

              Continue to keep me updated with any progress.

              FileMaker, Inc.

              • 4. Re: Relogin

                I did as you suggested.  To the script above I moved the Commit Records to after the EndIf.  I added a text field Whatisaccountname.

                Still doesn't work.

                I've attached a screenshot of the table.  I originally had the User and Password fields as calculations, they are now data.

                I find it interesting that it works in FM, just not in IWP.

                TSGal, your continued help is truly appreciated.

                • 5. Re: Relogin


                  Try this simple test:  

                  1. Create the following fields:

                  TextBefore (Text)
                  TextAfter (Text)
                  AccountName (Text - Global)
                  AccountPassword (Text - Global)

                  2. Create a script, "Re-Login", as follows:

                  Set Field [ TextBefore ; Get (AccountName) ]
                  Commit Records/Request
                  Re-Login [Account Name: AccountName ; Password: AccountPassword ; No dialog ]
                  Set Field [ TextAfter ; Get (AccountName) ]
                  Commit Records/Request

                  3. Place a button on the layout that executes the script "Re-Login"

                  4. Set the file for Instant Web Publishing

                  5. Activate the Guest account.

                  6. Set the File Options to log-in as the Guest account.

                  7. Close and open the file, and create one record.  Try to enter information into TextBefore.  You should get a message that it is inaccessible.

                  8. In AccountName, enter "Admin" and click the button.

                  9. You are now able to enter information into TextBefore. 

                  10. Blank out all fields and commit the data.

                  11. Use a browser and open the same file via instant web publishing.  Click on guest, and follow steps 7, 8 and 9 above.

                  Let me know if this fails for you.

                  FileMaker, Inc.

                  • 6. Re: Relogin

                    Well, some stuttering as I remembered that I had to modify the Guest privilege set.  And then I had to remember to modify the script to run with full access privileges.

                    I get down to step 8.  When I use the button, I get a message, "The account and password you entered cannot be used to access this file. Please try again.  I tried it again entering both the AccountName and the AccountPassword and got the same error.

                    I appreciate your patience.

                    • 7. Re: Relogin


                      I'll assume you tried this on your master file; not a new file.  Therefore, in step #8, enter the full access account name and password and click the button.

                      Let me know how it works out.

                      FileMaker, Inc.

                      • 8. Re: Relogin

                        That's what I did.

                        • 9. Re: Relogin
                          • OK, here's the answer.....

                            If you check a post I made on April 25, I was trying to figure out a way to have users skip the "Open database... with: Guest Account or Account Name and Password.

                            What I took away from Phil's comments was that only the Guest account should have the Instant Web Publishing extended privilege enabled.

                            Another way to avoid the sign in box is to set the File Options to log in to the Guest account. 

                            This all worked fine for me until I got to the Relogin part. I finally got frustrated and made a tiny new file with just the Relogin portions. I finally determined that "entering" as a Guest does not give that Guest the right to upgrade to another status unless that new status also has the IWP extended privilege set enabled. It's as if the "Fileflies" working in the basement said, "Hey buddy, I don't care what your privileges were when you signed in, now you want to upgrade to another status and that status doesn't have IWP enabled.  So, I'm not letting you in."

                            In fact, I found that I didn't need fields for each AccountUser and each AccountPassword.

                            A Relogin script of:

                            Re-Login [Account Name: file::FieldforUser; Password: file::FieldforPassword; no dialog]
                            Commit Records

                            works just fine.

                            I would never have gotten this far had Phil Modjunk not brought TSGal into the picture.  And, I would never have gotten this far without her help.