Hi Team,
We are building a search functionality in UiPath Solution Apps using Query Builder and are facing an issue when applying multiple filter conditions to a Custom List.
Currently, the filter works as expected when we use a single field. It also works when we combine Patient Name + Claim Number. However, when we add another condition such as Submitter Email, the complete filter stops working as expected.
Our requirement is to allow users to enter values in multiple search fields and return the complete matching records in the Custom List. The search fields include:
ID
Patient Name
Claim #
Submitter Email
Status (Dropdown)
DoB (Date Picker)
Submitted Start Date / End Date (Date Pickers)
Date of Service (Date Picker)
We have already tried the AND/OR filtering approach, but we are still facing issues when multiple fields are included.
Could someone please advise on the recommended Query Builder approach for handling multiple optional filters, especially when combining TextBox, Dropdown, and Date Picker* fields?
Any example expression or guidance on how to structure these conditions would be really helpful.
For this scenario, I would recommend using AND conditions, but only applying a filter when the corresponding search field has a value.
For example:
Patient Name → contains → Patient Name control
Claim # → contains → Claim control
Submitter Email → contains → Email control
Status → = → Status dropdown
DoB → = → DoB picker
Submitted Start Date → >=
Submitted End Date → <=
The important part is to use an If condition so that an empty control does not add a filter. Otherwise, when multiple conditions are added, the empty field can cause the query to return no results.
Also, from the screenshot, I would first check that PatientName, Claim and SubmitterEmail are actually pointing to their respective controls. They appear to reference the same control in the screenshot.
So the approach would be: only add populated filters → combine them using AND → bind the result to the Custom List.
This should allow users to enter any combination of search criteria and get the matching records.
@Shreeya_Joshi think the main issue is not AND/OR itself, but how the optional fields are handled.
If you use All (AND) and one of the controls is blank, that blank value may still become part of the query condition and then you can get no result.
I would suggest checking it step by step:
First validate each filter individually — Patient Name, Claim, Submitter Email.
Then combine Patient Name + Claim using AND.
Then add Submitter Email and verify that each condition is mapped to the correct textbox. From the screenshot, the expressions look very similar, so please double-check this.
For optional fields, apply the condition only when the user has entered/selected a value.
For dates, use proper comparison instead of contains:
DOB = selected date
Submitted Date >= Start Date
Submitted Date <= End Date
Date of Service = selected date
The expected logic should be something like:
If Patient Name has value → apply PatientName filter
If Claim has value → apply Claim filter
If Email has value → apply SubmitterEmail filter
If Status selected → apply Status filter
If DOB selected → apply DOB filter Then combine only the active conditions using AND.
Hi @Shreeya_Joshi ,
Use optional filters in Query Builder. Each condition should only be applied when the corresponding control has a value.
For Date Ranges
Use conditions like:
(SubmittedStartDate is empty OR SubmittedDate >= SubmittedStartDate)
AND
(SubmittedEndDate is empty OR SubmittedDate <= SubmittedEndDate)
Best Practice
Combine all filters with AND.
Make every filter optional by checking whether the control value is empty/null first.
Use Contains for text fields (Patient Name, Claim #, Email).
Use Equals for dropdowns and exact dates.
Test by adding one filter at a time and verify the value being passed from each control.
This way users can fill any combination of fields, and the Custom List will return only the records matching the populated filters while ignoring blank search fields.