Hello,
I am trying to link a Gallery, Search Text Box, and a Sort Icon, but I can get nothing to work together. I have tried different combinations of logic and searched various sites but have not been able to get anything to work correctly.
Here is my current status:
Sort Icon
OnSelect Formula = SortByColumns(Search('Project List',SearchEmployee.Text,"TeamMember","ProjectStatus","Projects","Title"),"TeamMember",If(SortDescending1,Descending,Ascending))
AccessibleLabel Formula = Self.Tooltip
SearchEmployee Text Box
OnChange = false
OnSelect = SortByColumns(Search('Project List',SearchEmployee.Text,"TeamMember","ProjectStatus","Projects","Title"),"TeamMember",If(SortDescending1,Descending,Ascending))
Project Gallery
OnSelect formula = Navigate(Project_Details,ScreenTransition.None)
Items formula = SortByColumns(Search('Project List',SearchEmployee.Text,"TeamMember","ProjectStatus","Projects","Title"),"TeamMember",If(SortDescending1,Descending,Ascending))
In the Project Gallery, once I overrode the SharePoint List name with the equation, all the lines of data disappeared. I basically see the below which shows a warning for all three of the elements I am trying to link up.
THanks!
Solved! Go to Solution.
Yep...that will make a huge difference!!
Try this then:
DropColumns(
SortByColumns(
Search(
AddColumns('Project List',
"txtTeamMember", TeamMember.Value,
"txtProjectStatus", ProjectStatus.Value,
"txtKPI", KPI.Value
),
SearchEmployee.Text,
"txtTeamMember",
"txtProjectStatus",
"txtKPI",
"Title"
),
"txtTeamMember",
If(SortOrder,Descending,Ascending)
),
"txtTeamMember",
"txtProjectStatus",
"txtKPI"
)
You now mention KPI - before we had Projects...is that KPI? Is that something that needs to be in the formula? Not sure where that went from your response.
Anyway, the above converts the values of the choice columns into text columns (via add columns) and then searches on the text columns. Finally, it drops the columns as to avoid any conflicts with other areas in your app.
Please consider changing your Formulas to the following.
Sort Icon
OnSelect action formula: UpdateContext({SortOrder:!SortOrder})
SearchEmployee TextInput
Remove the formulas you currently have for OnSelect.
Project Gallery
Items Formula:
SortByColumns(
Search('Project List',
SearchEmployee.Text,
"TeamMember",
"ProjectStatus",
"Projects",
"Title"
),
"TeamMember",
If(SortOrder,Descending,Ascending)
)
This should give you what you are looking for.
As for the warnings...yes, you are going to have delegation warnings because the Search function is not delegable. If your expecting to have over 2000 records in your data source, then consider alternative methods for searching.
I hope this is helpful for you.
Thanks @RandyHayes.
This did solve two of the issues but the gallery is still not displaying the current list of items. How can I get the search function to work and get the gallery of items to display? Would really appreciate some guidance on this last point.
No problem.
So, what are you seeing now? You seem to indicate that nothing is showing? Or am I missing something?
Hi @RandyHayes ,
This is all that I see. It looks like there is still an error and then no items are populating from the SharePoint List which it should be referencing. Currently there are about 10 items in the list and none of them show.
You are always going to have the delegation warning because you are using the Search function - it is not delegable.
As for nothing showing...what is the Default property of your SearchEmployee control?
Hi @RandyHayes ,
The current default property is actually blank. Could you guide me on the correct input for this section? Also here is a couple other fields in the Advanced section.
I do not believe the image you posted is the SearchEmployee control properties.
I am concerned over the Default property of the TextInput control you have called "SearchEmployee"
Hi @RandyHayes ,
You are correct. I did post the wrong section. Here is the correct section. Really appreciate your help!
No problem...always lots of moving parts!
That all looks good on the TextInput control.
So, the formula on your Gallery then still should be:
SortByColumns(
Search('Project List',
SearchEmployee.Text,
"TeamMember",
"ProjectStatus",
"Projects",
"Title"
),
"TeamMember",
If(SortOrder,Descending,Ascending)
)
Is this the formula you have now?
If that is not working, then I would be suspect of the fields listed.
Consider taking out all but Title to test:
SortByColumns(
Search('Project List',
SearchEmployee.Text,
"Title"
),
"TeamMember",
If(SortOrder,Descending,Ascending)
)
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |