Hello!
I am using 2 checkboxes & a textsearch box to filter my dropdownbox. Whenever I search for M8, I get all of the results with M8 inside of it.
What if I also know the length is 70. So then I would type in M8 70, currently the result does not show up when I search for that, as it is not an exact match.
M8 search results: https://gyazo.com/e640a45cc5b9d954a2ff63a5d4ecf94b
M8 70 search results: nothing
How can I make this a smart search function? Thanks in advance!
Here is my code for the dropdown:
SortByColumns(
If(
Checkbox2_1.Value = false && Checkbox2.Value = true;
If(
IsBlank(TekstZoekVeld_1.Text);
Distinct(
Lijst_Eindp;
Omschrijving
);
Distinct(
Filter(
Lijst_Eindp;
TekstZoekVeld_1.Text in 'Prod. usage'|| TekstZoekVeld_1.Text in Omschrijving
);Omschrijving)
);
Checkbox2_1.Value = true && Checkbox2.Value = false;
If(
IsBlank(TekstZoekVeld_1.Text);
Distinct(Filter(Lijst_Eindp; 'Prod. usage'="Bev M; Montage");Omschrijving);
Distinct(Filter(Lijst_Eindp; 'Prod. usage'="Bev M; Montage";TekstZoekVeld_1.Text in Omschrijving);Omschrijving)
)
); "Result")
Solved! Go to Solution.
Hi @Anonymous ,
Do you want to filter the Dropdown box records based on multiple search keys?
Regarding the needs that you want to achieve, I afraid that there is no direct way to achieve your needs. As an alternative solution, I think the collection could achieve your needs.
I have made a test on my side, please try the following workaround:
Set the OnChange property of the TekstZoekVeld_1 box to following:
ClearCollect(
RecordsCollection;
If(
Checkbox2_1.Value = false && Checkbox2.Value = true;
If(
IsBlank(TekstZoekVeld_1.Text);
Distinct(
Lijst_Eindp;
Omschrijving
);
Distinct(
ForAll(
Split(TekstZoekVeld_1.Text; " ");
Filter(
Lijst_Eindp;
Result in 'Prod. usage'|| Result in Omschrijving
)
);
Omschrijving
)
);
Checkbox2_1.Value = true && Checkbox2.Value = false;
If(
IsBlank(TekstZoekVeld_1.Text);
Distinct(Filter(Lijst_Eindp; 'Prod. usage'="Bev M; Montage");Omschrijving);
Distinct(
ForAll(
Split(TekstZoekVeld_1.Text; " ");
Filter(Lijst_Eindp; 'Prod. usage'="Bev M; Montage"; Result in Omschrijving)
);
Omschrijving
)
)
)
)
Set the Items property of the Dropdown box to following:
RecordsCollection
Note: When you select the Dropdown box, it would be populated with proper records from the RecordsCollection automatically.
Please try above solution, then check if the issue is solved.
Regards,
Are all your initial searches 2 characters - like the M8 you mention? Then you may be able to strip out the value using the Right or Left functions. It may be easier to have a separate input to capture the length of the string and then use the Len function and the IsBlank function to test for length
Thank you for your answer @BrianS
Not all searches will be 2 characters sadly. So this is not an option
Hi @Anonymous ,
Do you want to filter the Dropdown box records based on multiple search keys?
Regarding the needs that you want to achieve, I afraid that there is no direct way to achieve your needs. As an alternative solution, I think the collection could achieve your needs.
I have made a test on my side, please try the following workaround:
Set the OnChange property of the TekstZoekVeld_1 box to following:
ClearCollect(
RecordsCollection;
If(
Checkbox2_1.Value = false && Checkbox2.Value = true;
If(
IsBlank(TekstZoekVeld_1.Text);
Distinct(
Lijst_Eindp;
Omschrijving
);
Distinct(
ForAll(
Split(TekstZoekVeld_1.Text; " ");
Filter(
Lijst_Eindp;
Result in 'Prod. usage'|| Result in Omschrijving
)
);
Omschrijving
)
);
Checkbox2_1.Value = true && Checkbox2.Value = false;
If(
IsBlank(TekstZoekVeld_1.Text);
Distinct(Filter(Lijst_Eindp; 'Prod. usage'="Bev M; Montage");Omschrijving);
Distinct(
ForAll(
Split(TekstZoekVeld_1.Text; " ");
Filter(Lijst_Eindp; 'Prod. usage'="Bev M; Montage"; Result in Omschrijving)
);
Omschrijving
)
)
)
)
Set the Items property of the Dropdown box to following:
RecordsCollection
Note: When you select the Dropdown box, it would be populated with proper records from the RecordsCollection automatically.
Please try above solution, then check if the issue is solved.
Regards,
User | Count |
---|---|
253 | |
109 | |
92 | |
48 | |
37 |