Skip to Content
0

Contains Operator is not working with OR condition while doing search on two columns in smart table

Jan 30 at 11:43 AM

35

avatar image
Former Member

Hi All,

I have created search bar in smart table tool bar, i want to perform the search with entered value on two columns (QuotID and SalesOrg) in smart table using 'Contains' operator with 'OR' condition, but while doing search all records are coming from the back end. Below is the network tab url.

url : QuoteSet/?$filter=(substringof('8',QuotID) or substringof('8',SalesOrg)) and QuotStat eq '1' and (Assign eq 'X' or Assign eq '') and (QuoteFlag eq true or QuoteFlag eq false).

but if i do search on single column of table using 'Contains' operator it is working fine.

Filters are implemented for all columns at odata level.

Please guide me on this.

Thanks in advance,

Regards,

Purushotham.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Ankit Maskara
Jan 30 at 05:24 PM
0

With this URL you should be getting below filter in it_filter_select_options internal table ( now advised way is to fetch the same from io_tech_request_context) .

I EQ *8* for QuotID

I EQ *8* for SalesOrg.

Based on above you can use a CP keyword on internal table and mode. I think the answer is straighforward here but am I missing something which you have asked ?

Share
10 |10000 characters needed characters left characters exceeded
Ankit Maskara
Jan 30 at 05:27 PM
0

With this URL, you should get below entries in it_filter_select_options or io_tech_request_context->mt_filters

I EQ *8* QuotID

I EQ *8* SalesOrg.

Based on above you can use the CP operator on internal table and filter the data.

The answers seems straighforward but is this what you are looking for or not ?

Share
10 |10000 characters needed characters left characters exceeded