Hi,
I have a filter function where there is a searchbox "Name_Search" and I have applied the following code with StatsWith and EndsWith function. It is working fine for the first part of the name field "Name" but it doesn't show/filter the last part of the name until I completely type the last name in the "Name" field. Such as, if anyone's name is "Leonard Baidya" in the Name field and I type Leo, it filters all the names starting with Leo. But If I type Bai, it doesn't filter the last name until I type Baidya completely.
Is there any workaround? Or If I can search with any keywords from any part of a name (First/Middle/Last) that would be even better.
StartsWith(Name, Name_search.Text) || EndsWith(Name, Name_search.Text) &&
Here is my complete code as I have 2 drop downs and another text search box that the filter works on.
Filter(
PhoneBook,
Category.Value = "Staff" &&
StartsWith(Name, Name_search.Text) || EndsWith(Name, Name_search.Text) &&
(IsBlank(Callsign_search.Text) || StartsWith('Call-Sign', Callsign_search.Text)) &&
If(
Drop_location.Selected.Result = "All Locations",
true,
Location.Value = Drop_location.Selected.Result
) &&
If(
Drop_sec.Selected.Result1 = "All Sections",
true,
'Staff-Section'.Value = Drop_sec.Selected.Result1
)
)
Appreciate your help on this.
Regards
Leo