12 Replies Latest reply on Jun 9, 2012 1:59 PM by mygalaxy

    How to toggle 'Field Entry in Browse Mode' for a group of fields  on a layout browse mode.

    mygalaxy

      How to set group of fields to editable / uneditable in layout browse mode.

      Example I have Address fields on invoice layout. They are displayed from Customer table.

      The address fields are uneditable but want to give option to the user to edit the fields on clicking on Edit button.

       

      Message was edited by: mygalaxy

        • 1. Re: How to set group of fields to browse mode.
          PalmDBS

          You can't actually change the field to be editable in browse mode as if you checked the browse mode checkbox.

           

          What you have to do is enable the field in browse mode. Make the "edit" button set a global field to indicate that the fields are editable.

           

          set a script trigger on the address fields that checks the global value and blocks modification if the global is not indicating that the user is in edit mode.

           

          With some conditional formatting, you can even have the address fields appear greyed out when not in edit mode.

           

          Hope that gives you a start. Let us know if you need further help.

          1 of 1 people found this helpful
          • 2. Re: How to set group of fields to browse mode.
            mygalaxy

            I am also thinking of creating a script having steps - 1. go to field[] and 2. Enter browse mode. This is working but I have to repeat the steps for each field in the Address. 

             

            Thank you very much for the instant reply.

            • 3. Re: How to set group of fields to browse mode.
              CarstenLevin

              mygalaxy wrote:

               

              I am also thinking of creating a script having steps - 1. go to field[] and 2. Enter browse mode. This is working but I have to repeat the steps for each field in the Address. 

               

              Thank you very much for the instant reply.

              This sounds strange. Which mode are you in when you activate your script that

              • goes to field
              • enters browse mode

               

              I am not sur that you understand the roles of the modes (browse, preview, layout, find). As long as you are working in the solution (using it) you are probably in browse mode. Therefore going to a field and enter browse mode probably does not make a lot of sence. Unless:

              • When you display the invoice, are you then in preview mode?
              • 4. Re: How to set group of fields to browse mode.
                CarstenLevin

                Question about your goal:

                • You want to display the invoice
                • Of course while displaying the address from the customer table
                • You do not want the user to be able to accidentally edit customer data on the invoice layout
                • But in some cases they should be able to edit those data - just not without knowing that they are doing something affecting more than this invoice.

                 

                Is this correctly understood I would solve this in an compleetely different way.

                 

                Statement: An invoice is a very static document. When sent it should never be altered. Agree?

                 

                Thus you should not use related values in the fields on the invoice. If the customer moves to another address the use of related values will make the changes show up on an invoice previously sent. The same as if you use related values to show product names and product prices on invoice lines. A change in name or in price would change the invoice, in the worst case recalculating the values and the sum of the invoise after it is sent.

                 

                The correct solution when it comes to invoices are:

                • Set all the values on the invoice using lookup or auto-enter calculated value without enabling the replacement of existing values.
                • Then give the user the ability to edit those data that are now belonging to the invoice only.
                • When they click print/send to finish the invoicing you should set a value in a status field on this invoice and via the privilege set you should then disable editing of the invoice (and the invoice lines) based on the value of the status field.

                 

                I hope that this is of some help.

                 

                There are a few issues in this proposed solution. Feel free to ask questions on how to get through this.

                1 of 1 people found this helpful
                • 5. Re: How to set group of fields to browse mode.
                  mygalaxy

                  Hi Carsten Levin,

                   

                  Thank you very much for your time.  My goal is same as what you stated. The only difference is the invoices have already been sent and this project is to send reminders to clients with invoice dates older than 2 years from the current date.

                   

                  The Invoice table has Invoice No, Date, Client Id , job Description. Client Id is Foreign Key to Client Table.

                   

                   

                  I am working on FileMaker Pro 12.  The Invoice Layout is in Browse Mode for data entry. 

                  To make the address fields uneditable I unchecked Browse Mode checkbox (Inspector - Data tab - Behavior - Field Entry - Browse Mode). i.e No field entry in Browse Mode.

                   

                  Now in rare situations when there is change in address the user must be able to change it from Invoice layout rather than going back to 'Client' layout and come back. I am placing a 'Edit' button next Client Name and in Button Setup - I selected the script which has steps 1. Set Field [Client Address Street] 2. Enter Browse Mode 3. Set Field [Client Address Suburb] 4. Enter Browse Mode ... .... ... this way the fields are becoming editable and once I change the address and tab out of the fields they become uneditable again.

                   

                  Though the step 'Enter Browse Mode' is for whole layout I realise that by associating it with a Set Field step it is setting the field into Browse Mode.

                   

                  The only thing I want to achieve is I want to group the fields and refer to the group and set the fields in the group to editable mode. 

                   

                  Hope I conveyed what I am trying to achieve

                   

                  Thank you once again.

                  • 6. Re: How to set group of fields to browse mode.
                    comment

                    mygalaxy wrote:


                    I want to group the fields and refer to the group and set the fields in the group to editable mode.

                     

                    That's not possible. Why don't you use two groups, one with no entry allowed, the other - containing the same set of fields - with the entry enabled. Place the two groups in a tab control with 2 tabs and have your 'Edit" button switch between the tabs.

                    • 7. Re: How to set group of fields to browse mode.
                      CarstenLevin

                      Hi Michael H.,

                       

                      Your solution is usable, but for security and consistency I would suggest using the privilege set to controll whether the fields are editable or not - thereby also ensuring that an invoice that's been sent can not be edited afterwards.

                      • 8. Re: How to set group of fields to browse mode.
                        CarstenLevin

                        Hi Mygalaxy:

                         

                        Hmmm ... suggestion: Do not change the invoice when you have to send a reminder. Choose between two models, 1 or 2:

                        1. Create a new layout for the reminder. Create the extra fields you need, polulate them by lookup. Edit them if needed.
                        2. Instead of a new layout, create new record (using another table or the invoice table, depending on the logic), let this be related to the relevant invoice. Populate the fields by lookup.

                         

                        If it is model with a separate record and if you are using the same table, you should of course use another layout. And you will also have to avoid increasing the invoice number when you create a reminder.

                         

                        If you do just need a copy of the invoice with a new adress, I would go for model one. If you want to create a real reminder module, I would go for model two.

                         

                        Best regards

                         

                        Carsten

                        • 9. Re: How to set group of fields to browse mode.
                          comment

                          Carsten Levin wrote:

                           

                          for security and consistency I would suggest using the privilege set

                           

                          I disagree. OP has stated expressly that they "want to give option to the user to edit the fields on clicking on Edit button". This is by definition an issue of user-interface, not a security one. You may have a legitimate argument with the OP regarding whether that's a good policy to have. But as long as that is the policy, the implementation can and should be through layout tools.

                          • 10. Re: How to set group of fields to browse mode.
                            CarstenLevin

                            As you write:

                             

                            OP has stated expressly that they "want to give option to the user to edit the fields on clicking on Edit button".

                            And this is of course exactly the way to do it. But using the privilege set to do open/lock will also be consistence with the usual business rule: Lock an invoice that has been sent.

                             

                            But of course you can do it different from this, it is just (definetely) not my advice to do so:-)

                            • 11. Re: How to set group of fields to browse mode.
                              comment

                              To me, "lock an invoice that has been sent" means the user cannot unlock it by merely clicking on Edit button. If that's the case, then this is definitely an issue of privileges. You and mygalaxy don't seem to agree on this point.

                              • 12. Re: How to set group of fields to browse mode.
                                mygalaxy

                                Hi Michael and Carsten,

                                 

                                Thank you very much for the extensive guidance. Michael thank you for letting us know that setting group fileds to edit mode is not possible. This saves me lot of time with further investigation on possibility.

                                 

                                As suggested by Carsten I am developing this as a  seperate module called 'Reminders' and making a copy of invoice table and Client table. The changes made to the Client Address in this module not required to sync with the main accounting system Client table. (The Company management is retiring so they will not take any future major jobs and only send courtesy reminders to the clients that their equipment needs maintenance.)  The Invoice table  has only limited fields like Invoice Id, Invoce Date, client Id, Job Description and Remind field. The Client table has Client Id, Address fields.  This point I should have made it more clear in the beginning itself.

                                 

                                The company is planning to import invoice and client data from old system but they also want the layout for data entry for the data that cannot be imported. 

                                Finally I decided to implement it the following way.

                                 

                                I am developing a new invoice layout for invoice data entry.

                                I do not want the user to tab into address fields unless they want to change.

                                I am unchecking the 'Field Entry in Browse Mode'. 

                                Placing 'Edit' button next to Client Name (control style popup menu with values from dynamic value list from cllient table having Client id and Name)

                                When user clicks 'Edit button'  run a script to bring up a modal window with client layout & related client record. ( the window size is made small to look like a dialog )  using 'Go to related record' step to achieve this.

                                The user makes address changes and closes the window.

                                 

                                The responses given by everyone are encouraging to continue my devlopment.