I recently starting dabbling in SharePoint Online and I made a simple Issue Tracker from the template and decided to create the PowerApps mobile app. Very easy to do and simple to deploy.
When users try searching for a customer, it comes up blank. It will only search the first, key column called Ticket Number and even then, it wasn't an exact search.
How do we improve the search function of a PowerApp? Primarally, it needs to be able to search part or all of a Customer Name.
Thanks...
@v-xida-msft wrote:Hi @Garak0410,
Which data type of the customer field within your SP list? Is it a Person type column?
I agree with @timl's thought almost. You could consider take a try to select the Customer Data card within the Edit form of Edit screen, then within right pop-up panel, click Advanced tab button, the original field name would be displayed within DataField property.
If the Customer column is a Person type column, you could consider modify your formula within the Items property of the Gallery as below:
SortByColumns(
Filter('Issue Tracker', StartsWith(Customer.DisplayName, TextSearchBox1.Text)),
"Title",
If(SortDescending1, Descending, Ascending)
)In addition, above formula I provided may cause a Delegation warning, in order to get rid of the Delegation warning, please take a try with the following workaround:
Set the OnVisible property of the first screen of your app to following:
ClearCollect(IssueTrackerCollection,'Issue Tracker ')Set the Items property of the Gallery control to following:
SortByColumns(
Filter(IssueTrackerCollection, StartsWith(Customer.DisplayName, TextSearchBox1.Text)),
"Title",
If(SortDescending1, Descending, Ascending)
)
Best regards,
Kris
The column TYPE for Customer is listed as "Single Line of Text" and on this request: "You could consider take a try to select the Customer Data card within the Edit form of Edit screen, then within right pop-up panel, click Advanced tab button, the original field name would be displayed within DataField property."
This is what I found:
So is that the original field name? And if so, how do I fix it?
Hi @Garak0410,
Which data type of the customer field within your SP list? Is it a Person type column?
I agree with @timl's thought almost. You could consider take a try to select the Customer Data card within the Edit form of Edit screen, then within right pop-up panel, click Advanced tab button, the original field name would be displayed within DataField property.
If the Customer column is a Person type column, you could consider modify your formula within the Items property of the Gallery as below:
SortByColumns(
Filter('Issue Tracker', StartsWith(Customer.DisplayName, TextSearchBox1.Text)),
"Title",
If(SortDescending1, Descending, Ascending)
)
In addition, above formula I provided may cause a Delegation warning, in order to get rid of the Delegation warning, please take a try with the following workaround:
Set the OnVisible property of the first screen of your app to following:
ClearCollect(IssueTrackerCollection,'Issue Tracker ')
Set the Items property of the Gallery control to following:
SortByColumns(
Filter(IssueTrackerCollection, StartsWith(Customer.DisplayName, TextSearchBox1.Text)),
"Title",
If(SortDescending1, Descending, Ascending)
)
Best regards,
Kris
Hi @Garak0410 and @timl,
i found a good way to find out how SharePoint stores data is to put a datatable control on the screen and make the items property the data source. Then check the fields and see what’s in them. Also Search() is not delegatable in SharePoint lists. That’s why powerapps uses filter(Listname,StartsWith(... by default when it creates an app from data. My guess is that customers is a lookup field type in SharePoint. Like choice fields, These are actually embedded tables in a single field and are more difficult to work with in Powerapps.
Hi @Garak0410,
Hopefully, you'll resolve this problem when you find out the name of your customer field. Perhaps you could look at the Datafield property for the card in your edit screen to find out what this is.
@timl wrote:The first message is a delegation warning. This won't stop the search from working, but what it means is that if your source data contains more than a maximum of 2000 records, the results that PowerApps returns may not be accurate. If you search this forum, you'll find plenty of threads on this issue.
The cause of the second error message is most likely because "Customer" is a valid field name. If customer is a lookup column, we would need to modify the formula to account for this. To confirm the correct field name, if you add a label to screen and type the following into the text property, does Intellisense bring up Customer as a valid field name?
'Issue Tracker'.
I did the above and no, Customer is not coming up in Intellisense...I might have labeled it Customer but forgot where to go to view the original name.
The first message is a delegation warning. This won't stop the search from working, but what it means is that if your source data contains more than a maximum of 2000 records, the results that PowerApps returns may not be accurate. If you search this forum, you'll find plenty of threads on this issue.
The cause of the second error message is most likely because "Customer" is a valid field name. If customer is a lookup column, we would need to modify the formula to account for this. To confirm the correct field name, if you add a label to screen and type the following into the text property, does Intellisense bring up Customer as a valid field name?
'Issue Tracker'.
@timl wrote:Yes, that's correct. You would replace the formula with something that looks like this...
SortByColumns(Search('Issue Tracker', TextSearchBox1.Text, "Title", "CustomerName"), "Title", If(SortDescending1, Descending, Ascending) )Where I added "CustomerName", you would need to replace this with the actual name of your column.
Oh we are closer...when I replaced the formula with the above code, I got multiple warnings:
Yes, that's correct. You would replace the formula with something that looks like this...
SortByColumns(Search('Issue Tracker', TextSearchBox1.Text, "Title", "CustomerName"), "Title", If(SortDescending1, Descending, Ascending) )
Where I added "CustomerName", you would need to replace this with the actual name of your column.
@timl wrote:Hi @Garak0410
If you select the gallery control that displays your results (by default, this is called BrowseGallery1), the 'items' property of this control specifies the search formula.
The Search function allows you to specify the columns that you want to search against. You can include your customer name column by adding it in the call to the Search function, as illustrated in this screenshot.
This is helpful...currently, it shows this:
SortByColumns(Filter('Issue Tracker', StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
So I need to modify this similar to the example you sent?
Thanks...
Hi @Garak0410
If you select the gallery control that displays your results (by default, this is called BrowseGallery1), the 'items' property of this control specifies the search formula.
The Search function allows you to specify the columns that you want to search against. You can include your customer name column by adding it in the call to the Search function, as illustrated in this screenshot.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional