FindWindow builds LIKE query with "%" on only one side of query string

Description

In Find Window when user enters value in text field, if string isn’t ending with “%” it is appended in FindWindow class - in cmd_saveSimple method.

Example in Business Partner - for company Agri-Tech. If I enter “Agri” where part of SQL query becomes “Agri%” and result is found, but if I enter “Tech” I get no results, because query part is “Tech%”. It would be logical to me that % is on both sides of search query.

Is there any way to extend this FindWindow, I do not see way to do it via plugin?

Is solution to add FindWindowFactory, create an interface and use current implementation as default one, this should allow others to write their own logic for find window via plugin. We need, for example, option for advanced query building for search, because in Serbia we are using two letters for same language (Cyrillic and Latin) and we would first transliterate letters and then make query.

Environment

All Environments

Attachments

1

Activity

Carlos Ruiz 
November 19, 2024 at 10:22 AM

Thanks - NF12 wiki documentation is pending for this ticket.

Milos R 
November 13, 2024 at 1:21 PM

Here is an example in our case, how we did extend FindWindow

 

Milos R 
November 13, 2024 at 1:18 PM

Could you please review this approach, before i make a pull request.

Idea is to allow plugin developers to override FindWindow methods, so plugin developers could make their own SQL logic and FindWindow modifications.

Carlos Ruiz 
October 30, 2024 at 12:38 PM

Hi - something like that has been proposed with

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created October 30, 2024 at 12:34 PM
Updated January 1, 2025 at 12:40 PM
Resolved November 19, 2024 at 10:21 AM
Loading...