a-minus-sign-appears-when-performing-the-search-with-a-multiple-select

Questionsa-minus-sign-appears-when-performing-the-search-with-a-multiple-select
Samuel asked 4 weeks ago

When using the search with multiple select, I have a value that introduces a \”-\” before the value to search for, so it shows nothing because it doesn’t find anything. However, other values work correctly. How could that be?   Here is the code  

$col = array();
$col["title"] = "1ST_INSPECTION";
$col["name"] = "FIRST_INSPECTION";
$col["dbname"] = "PLM_SEGUIMIENTO.FIRST_INSPECTION";
$col["width"] = "100";
$col["align"] = "center";
$col["edittype"] = "select";
$col["editoptions"] = array("value"=>'OK:OK;NOT OK:NOT OK;DO:DO;NO NEED:NO NEED');
$str = "OK:OK;NOT OK:NOT OK;DO:DO;NO NEED:NO NEED;:Vacio";
$col["stype"] = "select";
$col["searchoptions"]["value"] = $str;
$col["editable"] = true;
$cols[] = $col;

and here you can see the result with -:
id_temporada_seleccionada: 13
grid_id: list1
_search: true
nd: 1730970286992
rows: 20
jqgrid_page: 1
sidx: 1
sord: asc
filters: {"groupOp":"AND","rules":[{"field":"FIRST_INSPECTION","op":"eq","data":"-OK"}]}

and without - :  
id_temporada_seleccionada: 13
grid_id: list1
_search: true
nd: 1730970326365
rows: 20
jqgrid_page: 1
sidx: 1
sord: asc
filters: {"groupOp":"AND","rules":[{"field":"FIRST_INSPECTION","op":"eq","data":"NOT OK"}]}

4 Answers
Samuel Gil answered 4 weeks ago

When using the search with multiple select, I have a value that introduces a \”-\” before the value to search for, so it shows nothing because it doesn’t find anything. However, other values work correctly. How could that be?

Here is the code  

$col = array();
$col["title"] = "1ST_INSPECTION";
$col["name"] = "FIRST_INSPECTION";
$col["dbname"] = "PLM_SEGUIMIENTO.FIRST_INSPECTION";
$col["width"] = "100";
$col["align"] = "center";
$col["edittype"] = "select";
$col["editoptions"] = array("value"=>'OK:OK;NOT OK:NOT OK;DO:DO;NO NEED:NO NEED');
$str = "OK:OK;NOT OK:NOT OK;DO:DO;NO NEED:NO NEED;:Vacio";
$col["stype"] = "select";
$col["searchoptions"]["value"] = $str;
$col["editable"] = true;
$cols[] = $col;

and here you can see the result with -:

id_temporada_seleccionada: 13
grid_id: list1
_search: true
nd: 1730970286992
rows: 20
jqgrid_page: 1
sidx: 1
sord: asc
filters: {\”groupOp\”:\”AND\”,\”rules\”[{\”field\”:\”FIRST_INSPECTION\”,\”op\”:\”eq\”,\”data\”:\”-OK\”}]}

and without – :

id_temporada_seleccionada: 13
grid_id: list1
_search: true
nd: 1730970326365
rows: 20
jqgrid_page: 1
sidx: 1
sord: asc
filters: {\”groupOp\”:\”AND\”,\”rules\”[{\”field\”:\”FIRST_INSPECTION\”,\”op\”:\”eq\”,\”data\”:\”NOT OK\”}]}

Abu Ghufran Staff answered 3 weeks ago

After several tries, I’m still unable to generate this issue.
Can you please share screencast or screenshots of the issue?

You can post it https://imgur.com/upload and share link.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Samuel answered 3 weeks ago

Hi Abu

 

 

here you can see screenshots

 

 

View post on imgur.com

 

 

Abu Ghufran Staff answered 1 week ago

I understand the issue you are facing but I cannot regenerate it here on my machine. It never passes – in filter.

Please share your complete grid code and related database table dump so I can regenerate the scenario.

You can email me at [email protected]

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

2 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?