1 2 Previous Next 18 Replies Latest reply on Jun 8, 2017 9:51 AM by bob_w

    Make Editable Button


      Hi Everyone – I want my layout and the fields non-editable during normal operation. I want a button on the layout with the text “Edit Record” when pressed, the fields that are non-editable (not able to browse) would not become editable. Then when the record or layout is changed the default state is back to non-editable or when the “Edit Record” button is pressed again the fields become non-editable again.


      Does anyone have an example or some knowledge for me to read on this is done please.

        • 1. Re: Make Editable Button
          Johan Hedman

          You could have two layouts that looks the same. When you click on the Edit Record you go to a layout where you can change field data

          • 2. Re: Make Editable Button

            You can drag a webviewer over the fields you want to limit access to. Name the webviewer object something like "webviewer".


            Make sure the webviewer is the top-most object and format so that in all states it has no fill, lines or shadows.


            Set the webviewer's Hide Object When calculation to:

            NOT $$EDIT


            Make a button that calls one script:

            Set Variable [ $$EDIT ; Value: not $$EDIT ]

            Refresh Object [ Object Name: "webviewer" ]


            You can format the button so that it changes colour depending on whether $$EDIT is true or false.


            I hope this helps.



            1 of 1 people found this helpful
            • 3. Re: Make Editable Button

              The way I do this is to have two copies of the field on the layout, stacked one on top of the other, one with browse enabled and the other without.  I also fill the browseable field with a yellow color to show to the end user that the field can be edited.


              I then use the hide condition to decide which field to show at what time.  I use a global field, e.g. "gEditMode" that is set to  1 by the Edit button.  The hide when function then uses that field to decide whether it should be shown or not.  To get out of the edit mode, just clear the value in the gEditMode field.


              You can also do a similar thing using maybe a two slide panel system, hiding one without the edit and showing the other one.  But the previous method allows increased fine control of exactly which fields can be edited as you can fine tune each field's access based on individual criteria. In the old days we used to use two layouts to do this.  Now with the hide option it is a little easier.  I still wish that FMI would provide a "Browse When" option, a feature that has been requested for many years now.

              • 4. Re: Make Editable Button
                Johan Hedman

                That is very hard when you want to do any changes to your layout, but it is not wrong.

                • 5. Re: Make Editable Button

                  Agreed. Changes to the layout are painful.  What I try to do is complete the layout as much as possible before starting to duplicate the fields.  But it can be a difficult process.

                  • 6. Re: Make Editable Button
                    Johan Hedman

                    Duplicate your layout. Get rid of all double fields and your solution will be a lot easier to handle

                    • 7. Re: Make Editable Button

                      If you have a limited number of fields to edit, you can use a popover with editable fields, opened using the "Edit" button.

                      • 8. Re: Make Editable Button

                        Whether you're talking about double layouts or double fields, you've doubled your work when it's time to make changes. Easiest solution is to intercept mouse clicks into fields using a show/hide webviewer.

                        • 9. Re: Make Editable Button

                          Or you can use Record Level Access Control. A "perform with full access privileges" enabled script can change the value of a specific field set up for the purpose of allowing/disallowing edits on a given record. This has the advantage of locking/unlocking the record no matter what layout is currently in use to display the data--where interface level based options only work for a specific layout or group of layouts.

                          • 10. Re: Make Editable Button

                            PeterDoern wrote:


                            Whether you're talking about double layouts or double fields, you've doubled your work when it's time to make changes. Easiest solution is to intercept mouse clicks into fields using a show/hide webviewer.


                            Not really that fond of this myself. I've inherited systems with the "big invisible button" before, and they're a pain to work on. Every time you want to check anything about any object on the layout - Conditional Formatting, scripts attached, Hide calculations, whatever - you have to move the overlying object out of the way and then back. That's a lot more frequent than making actual changes.


                            And, it causes issues with WebDirect (layering objects tends not to work so well). If it works for you, great, but in my experience, overlaying objects is more trouble than help.



                            • 11. Re: Make Editable Button

                              Yes, in that sense the popover solution you suggest above is probably the most suitable. Otherwise, I don't see how layering multiple fields (the hide function of which must be managed and evaluated independently) or creating duplicate layouts is less tedious than moving one object out of the way. But, like you suggest, to each his/her own.

                              • 12. Re: Make Editable Button

                                One very simple solution is to create a script that is simply


                                If [$$Edit]

                                Exit Script

                                End If

                                Go to Field



                                Have an Edit button on the layout that is

                                Set Variable [$$Edit; Value: Not $$Edit]


                                Then for the fields where you want to restrict entry, add a script trigger OnObjectEnter which is the 4 line script above.


                                Then you can toggle the single layout, single fields, no popover between editable and non-editable.

                                • 13. Re: Make Editable Button

                                  such a trigger fails to prevent modification to fields if the user employs drag and drop to modify the data. Drag and drop does not trip the OnObjectEnter trigger--one of the many details complicating layout based methods to control data access.

                                  • 14. Re: Make Editable Button

                                    Perform with full access privileges looks like the best solution. Could I trouble you for an example script as I am having trouble figuring out how to do this. Thank you for all your posts they are very helpful.

                                    1 2 Previous Next