Appreciate if somebody can check attached webscreen, the filters are not working.

I am a beginner, and found that search and filters are not working.

Hello Eman Alhariri!

I gave your application a try, however it seems to be working for me.  I went to the Directory screen, and if I search on Ahm then I get all users, but if I search for Abc then I get none.

Can you please tell me what you are trying and what you are expecting?  Also, what web browser and version are you using?

Thank you!

Hi Craig, 

Thank you for your reply.

I am using Google Chrome and Outsystems service studio 11.0

I am importing data from excel for employees and units. In the home screen, user should be able to search using any keywork.

Also in the right side I am trying to list all units as checkboxes, so user can select the unit and the employee list should be filtered based on the selection.

Hey Eman,

Currently, I see your aggregate is using the following filter:

SearchKeyword = ""
Employee.Name like "%" + SearchKeyword + "%"
Employee.ArabicName like "%" + SearchKeyword + "%"
Employee.Email like "%" + SearchKeyword + "%"
Unit.Unit_Name like "%" + SearchKeyword + "%"

This seems correct to me, unless you want to be able to filter on more attributes.  You can always continue the filter for Department_ID, DirectOfficeNumber, OfficeNumber, Fax, Extension, Mobile1, and Mobile2.  Are you having any issue with the search at the moment?

That said, your FilterEmployees and FilterSeeMore are a bit off.  Here are a few points to help you forward:

  • FilterEmployees
    • This is going to refresh the aggregate GetEmployees from the preparation, which uses the filters I listed above.
      • You could assign a value to SearchKeyword prior to refreshing the GetEmployees aggregate if you wanted
      • Alternatively, you could assign EmployeeId to EmployeeListFilterId (the input parameter to FilterEmployees), then add a filter in your preparation's GetEmployees that goes along the lines of this:
        EmployeeId = NullIdentifier() or Unit.Unit_ID = EmployeeId
    • Once you've refreshed your GetEmployees, you also need an AjaxRefresh on any widget that you wish to update on the screen, for example Table_Wrapper
      • Without this, you've reloaded data but never sent it to the browser
  • FilterSeeMore is doing an AjaxRefresh, but it does nothing to adjust any data
    • Looking at your If condition around OUsListRecord, you probably want to assign Session.EmployeeList_OUFilterCollapsed prior to doing your AjaxRefresh
    • Also, you might consider using GetUnits.Count instead of 999999999 in your If condition

Does that help?  Is there something I can explain further?

I have an issue with search, when I write a word and press enter it keeps loading for long time without giving result.

Hi Eman,

I'm observing the same behaviour as you. Craig may have missed it since you don't need to press 'Enter' to search in your application. In OutSystems, pressing 'Enter' will click the default button/link... you don't seem to have one defined for your screen so that might be causing issues.

Adding a default button/link (for Search, for instance) will solve your issue (but then you may want to remove the OnChange event handler of your SearchInput).