Announcement

Collapse
No announcement yet.

Grid filtering using Where IN [array]

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

  • Grid filtering using Where IN [array]

    Hi,
    I might be overlooking a post, but i cannot find an answer to this.
    I want to filter a grid using a global variable (array) to filter in the where clause.
    For example the content of the [variable] is : 5;11;16

    Select * from Product
    where ProductTypeID in ([variable])

    What is best practice to do this?

    I get an error message complaining about "... in (Array) )) nm_sel_esp "

    Thanks!

  • #2
    remember to add quotes if you dealing with strings
    but in your example your using semicolon, use commas
    just tested and it worked for me in a sql select in the grid

    Kevin

    Comment


    • #3
      Place it in the SQL Settings (left hand side) of the grid application: SELECT ...WHERE field1= '[variable_name]'...

      Comment


      • #4
        Originally posted by Kdriscoll View Post
        remember to add quotes if you dealing with strings
        but in your example your using semicolon, use commas
        just tested and it worked for me in a sql select in the grid

        Kevin
        Thanks, the comma separator did i for me. The default separator from lookups is ; but you can change it.

        Comment

        Working...
        X