Method Community

 

dropdown fields outside of the grid

Last post 01-20-2014 6:57 AM by Ivelina. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-17-2014 4:56 AM

    dropdown fields outside of the grid

    Hello, 

    I've created a dropdown called "CustomersList" that displays all customers and selected empty value as default (as i don't want to filter until a customer is selected). In Dropdown Object Actions I've added a text change event that loops through the grid. The dropdown fields is located outside the grid, so when I view the screen all grid records were there. 

    In step 3 of the grid wizzard inserted new automatic filter for my field "customer"  to be Equal To Value from screen CustomersList.

    Then no records were displayed on screen anymore, at least not until I select customer from the dropdown, after which all matching records appeared...  

    How to setup the grid/dropdown in order not to filter results until a customer is selected?

  • 01-17-2014 9:07 AM In reply to

    Re: dropdown fields outside of the grid

    Hi lvelina,

    I'm a little bit confused -- if not blank, what results do you want the grid to show by default before you select a customer?

  • 01-17-2014 9:27 AM In reply to

    Re: dropdown fields outside of the grid

    I'd like to see all results for all customers

  • 01-17-2014 9:40 AM In reply to

    Re: dropdown fields outside of the grid

    Gotcha. There's one way you can make this happen -- first we need to create TWO different filters in the grid. You already have one, which changes based on what customer you select: let's call this one the "Customer View". Create another filter for "All Customers" and set this to be the DEFAULT view: we'll call this the "Default View". Basically, by setting this to default, the moment your page loads, you will see the grid populate by all the customer items.

    Now, we need to set it up so that this filter changes from "Default View" to "Customer View" as soon as you pick something in the dropdown. To accomplish this, we will use a special action known as "Set View Filter" -- this is an action that allows you to change the filter on another object on the screen. So, go into your Customer Dropdown and add an action on "Text Change"  -- add the "Set View Filter" action, and have it change the grid's filter view from "Default View" to "Customer View". Now, when your page loads it will show all your customer information, but when you change it on the dropdown it will show information for that specific customer.

    Let me know if that's unclear, and I can go into some more depth.

  • 01-20-2014 6:57 AM In reply to

    Re: dropdown fields outside of the grid

    Hi,

    Thank you for the reply. It's very helpful and all is clear.

    Still, in my case I need few checkboxes let's say customer, product,country etc... It seems that I have to set all possible combinations between these checkboxes as filters and then for each checkbox set the logic which filter to be shown using conditinal statements(Is there other way?).

    If a matching case is found and I do have "Set View Filter" for it I'd like Method to end/stop execution of the conditional statements after that matching case and just show the filter? Is it possible?

    I'm not sure if I explained it well. So here it's an example:

        Start Conditional Statement    if product
            Start Conditional Statement    if customer
                Set View Filter    CustomerProduct
            End Conditional Statement    endif customer
            Set View Filter        Product
        End Conditional Statement    endif product

    If I do the statements this way it seems that I'll always end up with Product filter showing, even if I have a customer? Is there some action I can apply to prevent execution of statements after matching case?

    I think I've found it... Stop Processing More Actions

Page 1 of 1 (5 items)