Announcement

Collapse
No announcement yet.

How to come back to grid by redir mantaining the same filter was active before

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to come back to grid by redir mantaining the same filter was active before

    Hi, I got a grid (named i.e. grid_test) with left side (Refined Search) where user can choose product category filter.
    If he use it to filter product then he can do other things .
    At the end of these possible things I do a redir to grid but it's not connected to filter activated previously .
    In this case user has to start from the beginning to filter his data and go trough the path did before.
    Question: is it possible in some way to come back using redir to previous grid without showing to user the initial situation not filtered ?

  • #2
    Can you convert the redir to a sc generated link?
    Refined searches will persist when coming back from an app called via a link.

    Comment


    • #3
      I'm doing test using these macro under on_click events just to understand if they can be useful but nothing happens...;-(

      $save_current_where = {sc_where_current};
      echo $save_current_where;

      $save_current_filter = {sc_where_filter};
      echo $save_current_filter;

      ERRORS
      Error
      Undefined property: grid_TEST_BDGT_apl::$sc_where_atual
      Undefined property: grid_TEST_BDGT_apl::$sc_where_filtro

      Comment


      • #4
        Now I test them under PHP button and something appears...

        where ((CATEGORIA IN ('BDAG; ;BD Aghi')))

        The problem remains becouse the redir then has not possibility to insert sql

        Comment


        • #5
          Although the topic is more then a year old. This is exactly what I want. It there answer?
          Regards Bert Steinebach

          Comment


          • #6
            Hello Bert,
            I made a kind of solution that works for me. I'm not a programmer and I don't know if there are more 'intelligent' solutions... ;-)) . Probably yes... ;-)
            By the way the steps I did are the following.

            1. On User master data management I added a multi-select field with business sector of company and related and connected data. Area means business sector.
            2. On Login app, when user login, I added some lines that create a global variable that read sectors on user master data table and rewrite them in a particular way useful to following select
            3. On grid SQL Select I added the clase WHERE .... IN ([my_glo_var_with_special_sintax]) .

            If you look to attached image probably it will be more clear to you..
            Bye
            Giovanni
            Attached Files

            Comment


            • #7
              Yes giovanni, that's the way to go in the moment. In principle I change the WHERE clause dynamic.....I give it a try.
              Thanks sofar I let you know the results. Regards Bert

              Comment


              • #8
                Yes, it is succesfull.
                In the grid with the refined search I made a extra global on the end of the where clause. i.e [group] in which I put "and xxxx"
                xxxx is the field on which I made the selection.
                After selecting the filter I fill the global with the field on which the selecting takes place.
                On the form I made 2 buttons: One for go back to the main grid (clears up the global] and one to stay to the selecting. You user can choose.
                Thanks Bert

                Comment

                Working...
                X