5 Replies Latest reply: Aug 17, 2009 10:55 PM by shabar RSS

    How :SYSTEM.FORM_STATUS decides


      I have a form where it has few items (some are with LOV assigned) and set WHEN-VALIDATE-ITEMS for those.
      I want to display some alerts in KEY-EXIT trigger when user try to exit (F4) in half way entering the data. But it should alert only when :SYSTEM.FORM_STATUS is in CHANGE status. But in my situation it's in QUERY status after the above mentioned stage.

      How can I keep the form in CHANGE status in this situation? Is it possible?


        • 1. Re: How :SYSTEM.FORM_STATUS decides

          looking for set_record_property. You can set the status for the record with that command.

          • 2. Re: How :SYSTEM.FORM_STATUS decides
            Hi Ralf Flatau

            If we query data and in POST-QUERY if do any changes, should this :SYSTEM.FORM_STATUS change to
            QUERY ---> CHANGED

            I guess explicitly doing this is bit risky?


            • 3. Re: How :SYSTEM.FORM_STATUS decides
              Perhaps the simplest method would be to code your Key-Exit trigger to call the Clear_Form(ASK_COMMIT) or Clear_Block(ASK_COMMIT) built-ins and let Forms handle keeping track of if there are changes. The problem is you can't just check the :SYSTEM.Form_Status global, you would need to check :SYSTEM.Block_Status and :SYSTEM.Record_Status as well since each of these could and typically do have different values even when a change has been made to data in your form.

              Hope this helps.
              • 4. Re: How :SYSTEM.FORM_STATUS decides
                -> But in my situation it's in QUERY status after the above mentioned stage.

                Are you SURE? I have never seen any form with Form_Status NOT = 'CHANGED' when a value in a database block was altered.

                I think you should do some more testing to check things. If your Form_Status = 'QUERY', then what is the block status of your database block? What is the status of the record that you have changed?

                Or are you actually changing values in a control block, and then updating the database via your own update statements? In that case, you should set a package variable or some other flag to indicate that the user has begun entering changes.
                • 5. Re: How :SYSTEM.FORM_STATUS decides
                  Hi Steve Cosner

                  Thax for the reply.

                  What you mentioned was exactly correct. I made a mistake here because first tab in my canvas not a database block.
                  So there status change is no effected. Other tab having thought that data was changed I did this testing. but there was a bug with data change in POST-QUERY

                  Once again sorry about my mistake....

                  Thax for everyone who contributed.