locked
I turned off auto execute, yet my data sometimes auto execute? RRS feed

  • Question

  • Here is the scenario in case anyone want to try it and tell me if the same thing is happening to them.

    So I have a textbox that takes in a string ID that is bound to my query. Basically it allows a user to enter in an ID. Then there is a search button that searches the table for said ID.

    What is happening is that once i run a search, and change my page at least once, then if I go and change the content of my textbox (Id) the query, does an auto query with the new value in the textbox (of incase if you go to clear the textbox it querys everything)


    • Edited by this.Y Friday, February 8, 2013 3:06 PM
    Friday, February 8, 2013 3:00 PM

All replies

  • Hi,

    1. Create a screen based on the query.
    2. Configure your parameter controls in the screen designer (I assume that you already understand this).
    3. Highlight the query in the left-hand column of the screen designer and de-select Auto-execute in the property panel.
    4. Add data items "ApplyFilter" and "ClearFilter" methods.
    5. Set execute code for the methods:
    partial void ClearFilter_Execute()
            {
                this.<your parameter name> = null;
                this.Refresh();
            }
    
    partial void ApplyFilter_Execute()
            {
                this.<your query name>.Load();
            }

    If the user clicks the ApplyFilter button without making any parameter selections the entire entity set will load. The screen will not just reload with the complete entity set on its own.


    4tuneate


    • Edited by 4tuneate Saturday, February 9, 2013 1:45 AM clarify
    Saturday, February 9, 2013 1:42 AM
  • Thanks, but I already have those controls and methods 4tuneate. And I am not sure what is going on, but I'm testing it again this morning and its not auto loading querys when I change the fields anymore.
    Monday, February 11, 2013 2:43 PM