No announcement yet.

Select in a Grid

  • Filter
  • Time
  • Show
Clear All
new posts

  • Select in a Grid

    Perhaps somebody can give me a hint.
    I have a grid with about 5000 records shown.
    I made a new field (not a database field) and on bases of a certain script I filled this with 1 or 0.
    This field I donot what to show in the grid.
    I made a button and when I push it the grid should show only the records which are filled with 1.
    When I push it again the normal grid (not filtered) should show.
    So "bebind" the button there should come a script....but how to do?

    Would be fine when somebody helps me...

    A sort or search on a non-database field in sc would be fine for the moment....but how

    Last edited by ctmservice; 07-28-2015, 05:11 AM.

  • #2
    Hi Bert
    You want to create a Button on top of the GRID right?
    That is kind of tricky, cause
    - 1. A Button on top of GRID always needs that the Selector fields are activated, otherwise it wont work (from what I know, otherwise someone please update me if there is another solution for a RUN button)
    - 2. If you want to iterate on all Rows and access your NON-database-field, then I see only the onRecord Event, but I dont know how you can skip an entry

    So, If I had to do that, I would create a database-field with your 0 and 1, and then use the Refine Search to select which rows to show up.

    I dont know if that helps..


    • #3
      Use a parameter in your sql.
      select myfields from mytable where 1=1 and mycolumn in ([myvalues])
      Set the myvalues on your OnLoad (if I am not mistaken) or OnApplicationInit. I havent tested which one is the best in this case.
      In order to find that ouy put some php echo code on each event and see the order in which they run, you'll find it quickly enough.


      • #4
        Yes RR, that's the best way. Set a parameter in the sql. Thanks