1 2 Previous Next 15 Replies Latest reply on Feb 25, 2013 1:14 PM by philmodjunk

    Restricting Record access eliminates portal content in IWP but when viewed in FMP12

    rvarghes

      Title

      Restricting Record access eliminates portal content in IWP but when viewed in FMP12

      Post

           I have made a database that contains the following relationships - Family_Students, amoung others as you can see below.  I have a layout that displays family data and a portal that shows the Student data.  When I set-up custom security setting for the user account to only view their own student's data I can view the portal within FMP but when viewed from the IWP interface the portal contents are not present.  When the parent logs in they can view only their own's students data in the Family_student layout, but not when they return to the Family Layout "Family Summary".

           Is this a known issue or something that I need to address in another way to get IWP to replicate my FMP view.

           Any suggestions would be greatly appreciated.  Robin.

            

      FamilySummary.jpg

        • 1. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
          philmodjunk

               Is it the same layout in each case or do you have a set of layouts specifically designed for IWP use?

               Are the portals filtered or unfiltered?

               If they are filtered, please describe the filter.

               Whethere filtered or unfiltered, please describe the relationship.

          • 2. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
            rvarghes

                 I have designed layouts specifically for IWP as I am aware of the restricted functionality in comparison to FMP12.

                 The portals are filtered.  Upon login the user provides a login and password - both are searched against the Family table to find a matching entry.  The variable $$familyID is defined based on the record located that matches the password and login provided.  The variable $$familyID is defined and used to limit the values of the various portals I am using, though I don't think this was necessary and is likely redundant.

                 Relationships have been defined as

                 Family connected to the Students TO - labelled Famly_STUDENTS through the Kf-familyID

                 Family connected to the Parents TO - labelled Famly_PARENTS through the Kf-familyID

                 Family connected to Emergency_Contacts TO - labelled Family_EmergencyContacts through the Kf-familyID

                 I've attached a screenshot of the relavent portion of my database Relationships tab.

                  

            • 3. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
              philmodjunk

                   Does $$familyID get assigned a value via a script? Is that script performed via a script trigger?

                   If so, be advised that user interaction wth your layouts via a web browser cannot directly trip script triggers so the script that assigns a value to the variable may not be performed when Web users access your database.

                   Since you are using different layouts, you may also need to check the privilege set based security settings to make sure that you have specified the same options for the web layouts that you do for the non web layouts.

              • 4. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                rvarghes

                     Hi Phil, value for $$familyID is triggered by a script but that script is tied to a button on the login page.  The script does trigger as it limits the records shown at the 2nd screen - Family summary (image above in the orginal post).    If the scripts are all triggered by button that the user selects this should still work in the IWP mode - or am I misunderstanding what is intended by triggering?  A user can view or update their Student's data by either selecting the button update.  This takes the user to the Student layout - IWP layout based on the Family_Student TO.  The IWP Student layout limits the records the user can see to those with Kf_FamilyID=$$familyID however in the Family Summary Layout the portal window is empty.  If I remove the limited security settings from the USER to fully access the portal contents can be viewed and are limited to just those where Kf_familyID=$$familyID.  I can't figure out why when I limit the record access to only records where Kf_familyID=$$familyID the portal contents are not shown.  Any other thoughts?  Thanks for your interest and help.  Currently the layouts have no restrictions and I want to systematically determine how much I can limit before the database looses functionality.

                • 5. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                  philmodjunk

                       I'd check that script to make sure that all steps are web compatible. If even one step is not web compatible, the script does not run and the variable does not get a value. There's a compatibility drop down in the bottom left corner of the script editor you can use that will show incompatible steps as greyed out.

                  • 6. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                    rvarghes

                         The only two scripts that run before the user reaches the Family Summary Layout are the Login script and the Loginprocess script.  Neither have any components that appear grey when checked for IWP compatibility.  Is there anything with the limitation on records that I should be looking at?  I've set the limited access to records - kf_familyID=$$familyID .  Perhaps this is where I am going wrong?  Do I need a more detailed way to restrict users from only viewing their own records?

                    • 7. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                      philmodjunk

                           For testing purposes, I'd display the value of $$familyID on a layout where I can see it in my web browser. I don't know if putting <<$$FamilyID>> works in IWP, so you may need to set your script to copy this value to a field.

                           What you describe sounds like $$familyID is not getting a value.

                           PS. Why are you using global fields on a log in layout? (with a script that does not check to see if a valid login and password were entered.)

                           Why not use FileMaker's built in features to control access via having the user enter an account name and password?

                      • 8. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                        rvarghes

                             To test your idea that the $$familyID variable might not be working I created a new field in the Family Table called Variable, added that field to my Family summary Layout and in the login process scripted added 2 steps at the end of go to the field Variable and then Set field to $$familyID.  I tested this with two different parent logins and the familyID matched the expect result for both, so I'm confident that the variable is being set correctly and that the script is triggering.

                             My thoughts were that if I remove the restriction on the parents permissions the portal functions correctly but when limited to kf_familyID=$$familyID the portal does not display any records.  Likely the issue is with the permissions, but I'm new to FMP.

                             The login method was created by a friend who is developer - The script does check for a match in the preform find - which FMP does not show in the view I have attached.  The Process Login script has a find that searches the family records for matches between the $$login and $$password variables with the corresponding fields in the Family Table.  I expect to have around 200 users when we open registration and I wasn't sure if there was a benefit to exploring the FMP accounts for this.  Currently all parent automatically login with a Parent login automatically when they use the CWP link I send them.  The never see the IWP menus etc...  Do you think using the FMP login structure would fix the issue I'm having?

                             Is there a limit to the number of users I can set-up using the FMP system to control Logins and Passwords?  Any advice on using this if I go down this road?

                              

                              

                        • 9. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                          philmodjunk

                               This one's a new one on me. I've just been walking you through the things to check as possible issues here.

                               If you are not already doing so, include a commit records after setting the value of this variable to make sure that the change is submitted back to the server. Often such steps are needed for IWP where it is not required with Filemaker Clients.

                               If that still doesn't resolve this....

                               is this expression:

                               kf_familyID=$$familyID

                               A lock expression set up in manage | Security or a portal filter expression?

                               either could be used to control which records appear in a portal so that may give you an alternative approach to use.

                               You should also be able to include the kf_familyID field as a match field in the portal's relationship to limit which fields appear in the portal and that make for a faster screen update in the first place.

                          • 10. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                            rvarghes

                                 Glad to hear to it is not something obvious that I'm missing. 

                                 The express kf_familyID=$$familyID when used as a portal filter works well.  However, when I had a few glitches parents were able to view other families information.  When I try to use the expression under Manage| security, this is when I have the problem with the portal window contents disappearing.

                                 Any thoughts on why the security settings would cause the portal contents to disappear.  If I return the parents account to full view access the portal functions as expected.  Should I report this as an issue?  If so could I include our forum details?

                                  

                            • 11. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                              philmodjunk

                                   As a temporary test, redirect your IWP user to the same layout as you use with a Filemaker client. Do you see the records you should in this layout? If so, this is a permissions issue with the IWP layout. If not, the issue lies elsewhere.

                                   Did you try including a commit records step after setting the varaible's value?

                              • 12. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                                rvarghes

                                     To help keep everything as consistent as possible I am only using the same layouts in both the Filemaker Client as well as IWP and they are all created using the classic theme and using only scripts that are IWP compatible.  When viewing the same layout - Family Summary with the FMPclient the portal works as expected.  When view via IWP when the security for the records is limited to kf_familyID=$$familyID the portal contents are not visable.  If the security for the records level access are resorted to full the records are visable in the portal. 

                                     I did include a commit step however if the test field I created shows the value for the variable $$familyID in the family Summary Page then shouldn't this confirm that the variable value was committed to the server/database?

                                     Where should I go from here?  Shall I report this as a bug?

                                • 13. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                                  philmodjunk

                                       Are you using the same account to open the database via IWP as when from FileMaker?

                                       If so, then I'd report this as a bug in Report an Issue.

                                  • 14. Re: Restricting Record access eliminates portal content in IWP but when viewed in FMP12
                                    rvarghes

                                         Using the same account for both.  Thanks for your help today.  I apprecaite it.  Is there a way to reference our discussion to save duplication?

                                    1 2 Previous Next