1 2 Previous Next 18 Replies Latest reply on May 12, 2017 8:57 AM by cortiel

    how to make a form editable

    cortiel

      I think one of the worst features of FM is that all adata are editable on display

      so when a form comes up one can inadvertently change data without realizing it.

      I want to show data in read only mode and change the mode to edit mode on demand, in a button click ( or with user permissions ), But definately with a button. so one opens a screen and then pressed and edit button to change values. then when done presses a submit button to exit

       

      P

        • 1. Re: how to make a form editable
          steveromig

          A bunch of different approaches to do this.

           

          One of the "easiest" is to duplicate your layout and, using the Inspector, change the fields on one of the layouts to disallow entry in Browse mode.

           

          SampleIMage.jpg

           

          Then add an "edit record" button to this layout that switches to the other layout where all the fields are fully editable.  Then you can add a similar button to the "data entry" layout that "submits" the data and switches back to the "read only" layout.

           

          Steve Romig

          FileMaker, Inc.

          1 of 1 people found this helpful
          • 2. Re: how to make a form editable
            bigtom

            I do this by unchecking browse mode as steveromig suggested and a button bar icon with a popover for editing. Either using the actual fields or global fields as needed for the solution. Globals are a good safe way to go. When "Saved" the globals are saved to the record.

            • 3. Re: how to make a form editable
              cortiel

              Thanks. this doubles the form count, but still it's a workable solution.

              Now if I have a set of screens and I rename them with an added "View" or "Edit" in the name like

              - OS Form View

              - OS Form Edit

               

              how can I put a Button on every form to swith to its sibling Like

              goto layout [ Get(activescreenname) & " Edit"] or

              goto layout [ Get(activescreenname) & " View"]

               

              so I don't have to hard code this on every form

              • 4. Re: how to make a form editable
                beverly

                I do similarly. Consistency in naming layouts like this also makes finding them easier.

                "List"

                And all your list layouts are shown.

                But you can't beat that calculated Go to Layout (toggle).

                 

                Sent from miPhone

                • 5. Re: how to make a form editable
                  cortiel

                  >>But you can't beat that calculated Go to Layout (toggle).

                   

                  but in order to do this (what my question was about) how do I get the name of the current layout so  I can append to it in calculates layout????

                  • 6. Re: how to make a form editable
                    beverly

                    Sorry!

                    Get ( LayoutName )

                    Returns the name of the layout currently being displayed.

                     

                    beverly

                    • 7. Re: how to make a form editable
                      siplus

                      You could have a big transparent rectangle all over your layout which visibility you control. When it's visible, you click and the bigTransparentThing beeps at you. You click on edit and the BTT disappears.

                       

                      Of course this will be defeated by user tabbing, if a tab order exists.

                      • 8. Re: how to make a form editable
                        beverly

                        More completely, using "Layout Name by calculation":

                         

                        Go to Layout [

                        Let (

                        [ ~curLay = Get ( LayoutName )

                        ; ~editOrList = RightWords ( ~curLay ; 1 ) // return "List" or "Edit"

                        ; ~result = Case

                             ( ~editOrList = "List" ; Substitute ( ~curLay ; "List" ; "Edit" )

                             ; ~editOrList = "Edit" ; Substitute ( ~curLay ; "Edit" ; "List" )

                             ; ~curLay )

                        ]; ~result // this will be dynamically set to the layout name, toggled between List and Edit or staying where you are

                        )

                        ]

                        HTH,

                        beverly

                        • 9. Re: how to make a form editable
                          beverly

                          transparency over-lay was my friendly neighborhood spider man, until the layout went to WD. No layers (or behavior = not good).

                          beverly

                          • 10. Re: how to make a form editable
                            cortiel

                            now that leads me to another question. As I get more into this FMP thing I would like to make things more generic

                             

                            each form has a button bar on the bottom (since 12 hour ago :-) )

                            on the view form :

                            [Edit]  [Delete]

                            on the edit form they arecaptioned:

                            [Save]  [New]

                             

                            I can use the same bar on both form type if I can change the caption of the buttons from edit to save and from delete to new respectively. I know how to case the code appropiately, but nt hoe to cahnge the caption

                             

                            in VFP this is so ease like 'This.caption = "Edit" :-)

                             

                            Thanks

                             

                            P

                            • 11. Re: how to make a form editable
                              beverly

                              button bar labels can also be dynamic (using the same principle of getting the "List" or "Edit" as above)

                              but you also must remember that the label alone doesn't change, but the branching in the script called by each button must also test for the List or Edit. Or are you using a hiding technique or just have different buttons on the layout "types"?

                              • 12. Re: how to make a form editable
                                cortiel

                                I know. But how do I get to the caption

                                • 13. Re: how to make a form editable
                                  beverly

                                  caption? the LABEL of the button or the tooltip (shown on hover)?

                                  Screen shot(s) of layout mode and/or browse mode (of the buttons), please?

                                  beverly

                                  • 14. Re: how to make a form editable
                                    cortiel

                                    Usually the cation of a button is the text on the button. But if you prefer label, that's OK with me.

                                    how to you programmatically change the word on the button based on a condition in a script?

                                     

                                     

                                    2017-05-12_1045.png

                                     

                                    I want the word Edit replaced with Save if the form is "OS Form Edit" when the form is displayed.

                                    I know what to do when it's clicked

                                     

                                    if that is not possible I have to have 2 controls one which says Edit one which says Save

                                    1 2 Previous Next