9 Replies Latest reply on Jan 23, 2016 8:04 AM by DanielShanahan

    limited edit in a field based on a condition

    jdevans

      I would like to use Manage>Security>Privilege Sets to handle this but so far it isn't working...

       

      I have a layout, which I can control data edits via the Security/Privilege sets up to a point. But when I have a Portal on that same layout, the rules I setup for Record level edits (limited) aren't being applied to the portal.

       

      How can I do that?

       

      I just want the same condition to test for the Portal.

       

      It goes like this...I have a Privilege Set called "Staff". I have a button on the main layout to "Approve" the record. . That button click also sets a field to "Yes" for the record (this Field is auto-entered with "No" on new record create).  To limit edits to "Approved" records, I have Record level Edit set to allow edits to records in that table to when table::field="No". This works, on the Parent table, on which the layout is based. But the catch is, there's also a Portal to a Child table on this layout. Even when the Prvilege set test for edits is working for the fields on the layout that are fields of the Parent table, the Portal still allows edits. I tried to go back in a set the same rule for the Child table, record edit, but it isn't working.

       

      Can this be done, via the Manage>Security>Privilege Sets?

        • 1. Re: limited edit in a field based on a condition
          siplus

          why do you allow editing of the portal fields in the first place ? Just check off the Field entry - browse mode in inspector on the portal fields.

           

          Another radical approach is to not allow at all editing in the child table and only use scripts that are run with full privileges to do things.

          • 2. Re: limited edit in a field based on a condition
            jdevans

            siplus wrote:

             

            why do you allow editing of the portal fields in the first place ?

            Well, because the Portal is serving as a data entry point.

             

            siplus wrote:

             

            Another radical approach is to not allow at all editing in the child table and only use scripts that are run with full privileges to do things.

            Not sure I really understand what you mean here.

            • 3. Re: limited edit in a field based on a condition
              crhmac

              Hi jd evans.

              I don't like to use the portal to insert or edit informations, my opinion, the Portal is perfect to show informations.

              To edit or insert i like to use popovers, is easier to control the privileges.

              But if you prefer to use the Portal, in this case a Script Triggers when field is accessed "ONObjectEnter" in all Fields or Portal is the best form to control, using Variable to make this.

               

              Abs.

              • 4. Re: limited edit in a field based on a condition
                jdevans

                Basically, I was trying to avoid writing another script. If I could achieve it using Security settings, that was my preference. You have, however, induced interest for possibly using a Popover to data entry. If I have to write scripts anyway, It might make a more pleasant user experience to enter data for the portal via a popover, and then, like you and someone else suggested, use the portal for viewing the data only. I could still allow deleting of portal records, if the user decides in this use-case that they need to re-enter the data.

                • 5. Re: limited edit in a field based on a condition
                  crhmac

                  The Popovers was the best solution presented by FileMaker...

                  • 6. Re: limited edit in a field based on a condition
                    siplus

                    jdevans wrote

                    Not sure I really understand what you mean here.

                     

                    what crhmac says.

                    • 7. Re: limited edit in a field based on a condition
                      DanielShanahan

                      See if the attached helps.

                       

                      Basically, I was trying to avoid writing another script.

                       

                      Scripts are an integral part of FileMaker solutions.  There are a number of great resources available - videos, books, etc. - for learning.

                       

                      If you need help with a script, this forum is a great place to ask.

                      • 8. Re: limited edit in a field based on a condition
                        jdevans

                         

                         

                        Scripts are an integral part of FileMaker solutions.  There are a number of great resources available - videos, books, etc. - for learning.

                         

                        If you need help with a script, this forum is a great place to ask.

                         

                        Yes, I've written dozens of them. This solution is already gotten pretty big (about 100 scripts), and I had read that limiting edits is best  handled using Manage>Security via Privilege Sets. So, I was trying to go that route first, even in the Portal. I think I like the idea of using a popover to enter the data into the portal. So I'm going to give that a go.

                         

                        This website, and its Discussion boards have been a great source of information, design ideas, methodologies, etc, and I use it all the time.

                         

                         

                         

                        Thanks Daniel

                        • 9. Re: limited edit in a field based on a condition
                          DanielShanahan

                          OK. It's sometimes hard to tell someone's level with FMP from a few comments. No offense intended.

                           

                          TO attach a file, click on the "Use advanced editor" in the top right of the response window.  An Attach link will be on the lower right of the new window.