locked
Query filter selecting NULL values not valid RRS feed

  • Question

  • I need to select all rows that match a parameter or are NULL from a field that references another table.

    I tried to set the filter checking if the related table "Articulo" is null, but I get a "filter not valid" error:

    Filter selecting NULL values

    How should I select the rows from "Destino" that have no "Articulo" associated?

    Thursday, March 22, 2012 9:54 AM

Answers

  • Create a query for destinos (not filter on the screen), add the first parameter as is and if (for the shake of example) the name of the query is DestinosQuery,

    then from WriteCode select DestinosQuery_PreprocessQuery

    and write

    query = query.Where(d=>Articulo == null);
    then use this query in your screen


    1+1 = 3 for large values of 1


    Thursday, March 22, 2012 1:42 PM

All replies

  • Create a query for destinos (not filter on the screen), add the first parameter as is and if (for the shake of example) the name of the query is DestinosQuery,

    then from WriteCode select DestinosQuery_PreprocessQuery

    and write

    query = query.Where(d=>Articulo == null);
    then use this query in your screen


    1+1 = 3 for large values of 1


    Thursday, March 22, 2012 1:42 PM
  • Thanks Kostas, I created a new query and the filter is working ok.

    Is there a reason because this kind of filters cannot be added on screen filters?

    Thursday, March 22, 2012 3:30 PM