Hi All,
I have created a collection of my dataset which is a SharePoint list.
In my app, Gallery, I am trying to filter the collection with a combo control (choices of Phases) and a search text input by using the below formula : Search(Filter(colGridData,Phases = cmbfilterphases_1.Selected.Result),TextInput_search_project_2.Text,"Project_Name").
Here colgriddata is my collection of SharepointlIst and Phases is the choice field and TextInput_search_project_2 is my text input field to search the gallery for the project name.
However I am getting an error Incompatible types for comparison. These types can't be compared Record , Record.
Can you please assist.
Solved! Go to Solution.
Hi @Aminah_Hussain ,
Please try:
Search(Filter(colGridData,Phases.Value = cmbfilterphases_1.Selected.Result),TextInput_search_project_2.Text,"Project_Name")
Best Regards,
Dezhi
One (or more) of these four things is incorrect-
If all were correct, the code would be valid.
Hi @Aminah_Hussain ,
Please try:
Search(Filter(colGridData,Phases.Value = cmbfilterphases_1.Selected.Result),TextInput_search_project_2.Text,"Project_Name")
Best Regards,
Dezhi
Happy to help on this - what type of fields are Project_Name and Phases. If Choice fields, are they single or multi-select and is cmbfilterphases_1 a single or multi-select?
Hi,
Thanks for the above. However I am still getting an error Incompatible types of comparison. These types cannot be compared, Text, Record
HI Warren,
Project name is a Text input and Phases is a choice field with single select
Regards,
Aminah
Hi @Aminah_Hussain ,
Assuming cmbfilterphases_1 is also a single select combo box, your code would be
Search(
Filter(
colGridData,
Phases.Value = cmbfilterphases_1.Selected.Result
),
TextInput_search_project_2.Text,
"Project_Name"
)
If this is not the case (as you indicated in the PM), one of the three assumptions is incorrect.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi Warren,
It gives the same error Incompatible types of comparison. These types cannot be compared, Text, Record.
Restating the properties of the controls:
TextInput_search_project_2 - this is a search box to filter gallery based on the project name
Project Name column is a text input field
Phases is a choice col with single select.
My gallery is using the collection colgriddata which is picking data from the SharepointList: Master_Project_List
Hope this information helps to resolve the query.
One (or more) of these four things is incorrect-
If all were correct, the code would be valid.
Hi Warren,
Thanks for the above guidance, as a work around,
I copied the control from my gallery for the phases to use it as filter and then the formula does not throw any error but the gallery is not getting filtered on the selections.
Thanks for your assistance.
Hi Dezhili,
I copied the control from my gallery for the phases to use it as filter and then the formula does not throw any error but the gallery is not getting filtered on the selections.
Regards,
Aminah
User | Count |
---|---|
261 | |
110 | |
90 | |
54 | |
44 |