Ajax DataGrid Support Product Page
What is the proper syntax for filtering records that are not equal to an entered value?
Asked 18 Jun 2013 23:15:04
1
has this question
18 Jun 2013 23:15:04 Steve Skinner posted:
I have one working ajax datagrid working fine where I'm filtering on a field = "yes". In the datagrid dialog, I just select the field, then = and then provide the entered value. However, I want to also identify the records where that field does not equal "yes". You'd think that all you'd have to do is change the = to <>, but that returns no results, and I know for a fact that the table has lots of rows where this field is null.
1) What is the proper syntax for finding records that are NOT equal to an entered value? Because, selecting the field then <> and then the entered value does not work.
2) What is the proper syntax for finding records where a selected field is null? The usual way you'd do this in DW recordsets doesn't work with Ajax Datagrid.
I did search the help, faq, and also the manual for this product and couldn't find anything relating to this, so hopefully you can provide a quick answer.
Thanks!
Replies
Replied 19 Jun 2013 10:17:24
19 Jun 2013 10:17:24 Miroslav Zografski replied:
Hello Steve.
Basically it must be as you do it.
select field select <> and set the value to compare with. You could eventually try the reverse thing -> = NULL
Regards.
Basically it must be as you do it.
select field select <> and set the value to compare with. You could eventually try the reverse thing -> = NULL
Regards.
Replied 19 Jun 2013 12:48:49
19 Jun 2013 12:48:49 Steve Skinner replied:
Well, then there is a problem. Setting it to = NULL doesn't return any records, and I know there are thousands.
Replied 20 Jun 2013 00:03:48
20 Jun 2013 00:03:48 Steve Skinner replied:
As a follow up, and proof of the problem, I created this page:
www.reliable-service.com/sandbox/notprinted.asp
The top section is ajax datagrid with a recordset filtering on the printed status field, with the filter set for = NULL. It shows no records.
The second section is a regular old DW recordset that is filtered for the same, but you can see it actually shows matching records.
If ajax datagrid is working as expected, then it's either not designed to filter items based on whether a field contains a null value, or there's just a syntax that will work that I'm not aware of. Hopefully, you can help me figure out how to get the extension to find records where a certain field contains null.
Thanks!
www.reliable-service.com/sandbox/notprinted.asp
The top section is ajax datagrid with a recordset filtering on the printed status field, with the filter set for = NULL. It shows no records.
The second section is a regular old DW recordset that is filtered for the same, but you can see it actually shows matching records.
If ajax datagrid is working as expected, then it's either not designed to filter items based on whether a field contains a null value, or there's just a syntax that will work that I'm not aware of. Hopefully, you can help me figure out how to get the extension to find records where a certain field contains null.
Thanks!
Replied 20 Jun 2013 07:54:49
20 Jun 2013 07:54:49 Miroslav Zografski replied:
Hello Steve,
Can you try making that Printed column with default value for each newly added item, lets say "Not", and update it after it is printed to "Yes". Then filter the datagrid again, but this time using = "Not"?
I believe the isse is that filtering in data grid is expecting string or numeric values and can't deal with native values as NULL or alike.
Regards.
Can you try making that Printed column with default value for each newly added item, lets say "Not", and update it after it is printed to "Yes". Then filter the datagrid again, but this time using = "Not"?
I believe the isse is that filtering in data grid is expecting string or numeric values and can't deal with native values as NULL or alike.
Regards.
Replied 20 Jun 2013 16:26:48
20 Jun 2013 16:26:48 Steve Skinner replied:
I'd rather not mess with the live data on this customer site. However, since I was originally filtering for the printed status = yes, which was working, I thought the opposite would work - printed status <> yes. That would have been just as good as finding records where that field matches Null, but printed status <> yes did not work either!
Replied 20 Jun 2013 18:03:53
20 Jun 2013 18:03:53 Steve Skinner replied:
Here's a couple of screen captures that tell the story much better than I can.
See for yourself...
(you might need to open these images in a new window to read them more easily)
Here's the ajax datagrid with my field = yes
You can see in the test query that the data is properly found.
Now, if I tell it to find the records where my field <> yes....
Pretty conclusive, isn't it? I really need to be able to either locate fields with Null, or that are not equal to a certain value. Shouldn't ajax datagrid handle one of these ways?
See for yourself...
(you might need to open these images in a new window to read them more easily)
Here's the ajax datagrid with my field = yes
You can see in the test query that the data is properly found.
Now, if I tell it to find the records where my field <> yes....
Pretty conclusive, isn't it? I really need to be able to either locate fields with Null, or that are not equal to a certain value. Shouldn't ajax datagrid handle one of these ways?
Replied 21 Jun 2013 07:29:15
21 Jun 2013 07:29:15 Miroslav Zografski replied:
Hello Steve,
What type is the Database?
Regards.
What type is the Database?
Regards.
Replied 21 Jun 2013 13:48:42
21 Jun 2013 13:48:42 Steve Skinner replied:
Windows server / SQL
Replied 03 Jul 2013 16:55:08
03 Jul 2013 16:55:08 Steve Skinner replied:
It's been a couple of weeks... I am awaiting your input for help on this please.