OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions oro_jqueryselect2_hidden sorting order and results list

This topic contains 4 replies, has 2 voices, and was last updated by  Stepan Yudin 7 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36381

    Stepan Yudin
    Participant

    Good day everyone!
    Today i’ve stuck with 3 issues:

    1) Can we define sorting order or query builder for ‘oro_jqueryselect2_hidden’ type? (and for ‘oro_entity_create_or_select_inline’)

    2) If i use autocomplete input in this form type then matched results are understroked, but non-matched results are still shown. Is there any possibility to hide non-matching results?

    3) This field functionality depends on entity search config. Here is one limitation: if i type on;y the part of word – then nothing will be found.
    For example $entity->__toString() = ‘My Very Special Entity’. If i type ‘pecial’ – then the entity will not be found.
    Is there any way to tweak search engine to look for parts of words?


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #36382

    Mike Kudelya
    Participant

    Hi

    1) I have tried sort Account result on opportunity edit page. Here is sorting call:

    i put it there. As variant you can create your own autocomplete handler with overridden searchIds function. Autocomplete alias must be set in autocomplete_alias property.

    2) I’m not really understand your question. Can you describe more detail, please ? For me, when entity data doesn’t match search query it doesn’t appear on select2 field.

    3) Unfortunately our autocomplete doesn’t search in substring. Create own autocomplete handler and try to search via mysql fulltext search.

    #36383

    Stepan Yudin
    Participant

    Thank you Mike! I realy appreciate your help in community support)

    1) Gotcha, it works!
    2) Take a look at the sreenshot: screenshot Matched record is understroked, but not-matched are still shown
    3) Will try next week, thank you. Will post solution snippet here


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

    #36384

    Mike Kudelya
    Participant

    Hi

    2) There are two things that do not allow get what you want.

    By default ft_min_word_len=3, search is ignoring your numbers in search. I have changed it to 1.

    Also i have changed this line to:

    I think you can play with this boolean operators. More information you can find there.

    #36385

    Stepan Yudin
    Participant

    Thank you for explanations, Mike!

    Now i implemented searchIds() method to use simple QueryBuilder with LIKE operator and everything works good.
    When i’ll finish reading mysql fulltext docs – i’ll implement it properly)


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top