<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I am using QGIS 3.22.8 and I have a problem with filtering new added features.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">In one of my arc layer I have around 38 arc features.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">There is an attribute of interest named ID where I have to apply all kind of filters like<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">“ID” = 1 or “ID” IN (2,5,7)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Few days ago I added four new feature with the ID attributes 38, 38, 100 and 101.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Today I tried to filter after any of these new attributes and the filter returns nothing.<o:p></o:p></span></p>
<p class="MsoNormal"><img width="732" height="409" style="width:7.625in;height:4.2638in" id="Picture_x0020_1" src="cid:image001.png@01D89D32.513B8350"><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I get the message The where clause returned 0 row(s).<o:p></o:p></span></p>
<p class="MsoNormal"><img width="433" height="285" style="width:4.5138in;height:2.9652in" id="Picture_x0020_5" src="cid:image002.png@01D89D32.513B8350"><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">If I put the filter <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">NOT "ID" != 100<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">It works fine.<o:p></o:p></span></p>
<p class="MsoNormal"><img width="537" height="371" style="width:5.5902in;height:3.8611in" id="Picture_x0020_3" src="cid:image003.png@01D89D32.513B8350"><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">When I filter features which exited before I added new four it works.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">For example “ID” = 35 the filter works fine<o:p></o:p></span></p>
<p class="MsoNormal"><img width="611" height="381" style="width:6.368in;height:3.9652in" id="Picture_x0020_4" src="cid:image004.png@01D89D32.513B8350"><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The same thing when I use selectByExpression<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">When I put <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">layer.selectByExpression("\"ID\"=37")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">layer.selectByExpression("\"ID\"=38")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">layer.selectByExpression("\"ID\"=100")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">layer.selectByExpression("\"ID\"=101")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">no features is selected<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">but when I put <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">layer.selectByExpression("\"ID\"=35")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">feature with ID = 35 is selected.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Why QGIS 3.22.8 does not filter or select new features by attribute?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I did not have this problem in QGIS 2.18.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thank you,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Marian<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This electronic message, as well as any transmitted files included in the electronic message, may contain privileged or confidential information and is intended solely for the use of the individual(s) or entity to which it is addressed. If you have received
this electronic message in error please notify the sender immediately and delete the electronic message. Any unauthorized copying, disclosure or distribution of the electronic message is strictly forbidden. NAV CANADA accepts no liability for any damage caused
by any virus and/or other malicious code transmitted by this electronic communication.<br>
<br>
Le présent message électronique et tout fichier qui peut y être joint peuvent contenir des renseignements privilégiés ou confidentiels destinés à l’usage exclusif des personnes ou des organismes à qui ils s’adressent. Si vous avez reçu ce message électronique
par erreur, veuillez en informer l’expéditeur immédiatement et supprimez le. Toute reproduction, divulgation ou distribution du présent message électronique est strictement interdite. NAV CANADA n’assume aucune responsabilité en cas de dommage causé par tout
virus ou autre programme malveillant transmis par ce message électronique.<br>
</font>
</body>
</html>