Starts in:
2 DAYS
0 HR
51 MIN
20 SEC
Starts in:
2 D
0 H
51 M
20 S
Open Closed

advanced search capability. #2074


User avatar
0
Neozzz created

Hi,

We were looking at the easycrm example from abp docs.

We've seen the advanced search implementation to retrieve a list of accounts through advanced search. Here we can at a time search and apply filter for only one word per field, for example we can retrieve a list of all accounts where country is USA.

Similarly, do we have any example or reference docs where we can obtain a list of accounts where country is USA, New Zealand, Italy etc. for example? Something where we can pass multiple words as search terms to each fields?

Thank you.

  • ABP Framework version: v4.4.3
  • UI type: swagger/angular
  • DB provider: EF Core & MongoDB

4 Answer(s)
  • User Avatar
    0
    Neozzz created

    Hi, usually you guys are atleast 10 hours quicker, havent taken 22 hours to reply to a ticket until the past 2 days.

    hope everything is fine over there.

    kindly look into this.

    thank

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Similarly, do we have any example or reference docs where we can obtain a list of accounts where country is USA, New Zealand, Italy etc. for example?

    You can download the source code here: https://docs.abp.io/en/commercial/latest/samples/easy-crm#download

    Something where we can pass multiple words as search terms to each fields?

    Are you talking about front-end components? like: https://material.angular.io/components/select/overview#multiple-selection

  • User Avatar
    0
    Neozzz created

    hi liang, i am talking about the end point itself. the current search only allowed one term per field to retrieve record. i was asking about a scenario where we can search by multiple terms per field. hope i am able to convey my concern. please let me know.

    thank you :)

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Yes, you can

    Just:

    var countries = new List<string>();
    var results = await repository.where(x => countries.Any(country => x.Name.Contains(country))).ToListAsync();
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06