4 Replies Latest reply on Oct 8, 2014 8:03 AM by lijnbach

    Finding out when a record is commited

    lijnbach

      Title

      Finding out when a record is commited

      Post

      Hello everybody,

      For users I disabled the menu's. So I have a button "revert record". It all works fine.

      But, I want to hide the button if the record is already committed or if there is nothing to revert. I can't find a way to hide the button conditionally (If there is nothing to revert). Can someone help me out.

      Thanks in advance,

      Hans Lijnbach

        • 1. Re: Finding out when a record is commited
          WF7A

          Greetings, Hans,

          Which version of FileMaker do you have? If you have v13.x, In the Inspector, under Data tab > Behavior > Hide Object When, you can set up a test in that field so when there's no data in it then it wouldn't be visible to the user, e.g.:  

          IsEmpty (field name)

          Is that what you're after?

          • 2. Re: Finding out when a record is commited
            lijnbach

            Thanks for your response,

            Yes I have FMP 13 Advanced, and I used your suggestion before. But now I have a database in which some fields can stay empty. And in that case I can't use  ''IsEmpty''. In the menu bar there is a menu option "revert record", but this menu option is grey in case there is no revert possible. So I am looking for a way to find out whether a record is committed or not, without using the menu option. I have a button "revert record", but I can't hide the button properly because I don't know wether the record is committed or not.

            Sorry for my late response, but that is because of the time difference.

            Hans Lijnbach

            • 3. Re: Finding out when a record is commited
              ChristianArtner-Yanni

              the proper function for that would be "Get( RecordOpenState )", but i guess you will have to combine that with a "OnObjectModify" field-trigger to "Refresh Object" (object = your button).

              another option would be, to disable the "Save record changes automatically" in the layout setup, then you wouldn´t even need your revert button.

              christian

              • 4. Re: Finding out when a record is commited
                lijnbach

                Thanks Christian,

                That is the one I need. (Get(RecordOpenState)). I couldn't find that one because of our translation (Dutch). I have been struggling  before because of the translations. (Dutch). But this is the proper function. (Just have to try to find the Dutch one).

                I will also try the second solution and find out what is working best.

                Thanks for your effort and time.

                Hans Lijnbach