Ok, here is the current code:
SortByColumns(
Filter(
[@'BusMarket - IBC PreSurvey'],
TextSearchBox1.Text in 'Sales Team Information'.DisplayName
|| TextSearchBox1.Text in Customer
|| TextSearchBox1.Text in 'Customer Contacts'
|| TextSearchBox1.Text in 'Customer Phones'
|| TextSearchBox1.Text in 'Customer Email'
|| TextSearchBox1.Text in Customer
|| TextSearchBox1.Text in 'Service Address'
|| TextSearchBox1.Text in 'Primary Phone Number'
|| TextSearchBox1.Text in 'Lotus Notes/Presurvey Number'
),
"Created", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)
)
I recognize this results in a delegation problem. We'll address that with scheduled data archival to stay under the limit.
My problem is the text entered in TextSearchBox1 does not return records where the text string exists within the names contained in the 'Sales Team Information' column which is a Person/Group column in SP.
I'm sure the problem is that since 'Sales Team Information' contains a table and not even just a single record, .DisplayName is meaningless.
I made it work. Here was my solution:
I used Concat to convert the contents of the Person column into one long text string. In fact, it's exactly the same Concat function that I used to display the names in that field within the form for users to visually see.
Then you just compare the text string to the text. Easy peasy lemon squeezy. Only took four days. 😄
SortByColumns(
Filter(
[@'BusMarket - IBC PreSurvey'],
TextSearchBox1.Text in Concat(
'Sales Team Information',
DisplayName & ", "
) || TextSearchBox1.Text in Customer || TextSearchBox1.Text in 'Customer Contacts' || TextSearchBox1.Text in 'Customer Phones' || TextSearchBox1.Text in 'Customer Email' || TextSearchBox1.Text in Customer || TextSearchBox1.Text in 'Service Address' || TextSearchBox1.Text in 'Primary Phone Number' || TextSearchBox1.Text in 'Lotus Notes/Presurvey Number'
),
"Created",
If(
SortDescending1,
SortOrder.Descending,
SortOrder.Ascending
)
)
Forgive the nasty formatting. That's PowerApps making a mess.
Thank you Warren. But that didn't work either.
Console shows an error in the Search function. It's also telling me all of those fields don't exist.
You can also try this
SortByColumns(
Search(
AddColumns(
[@'BusMarket - IBC PreSurvey'],
"SalesTeam",
'Sales Team Information'.DisplayName
),
TextSearchBox1.Text,
"SalesTeam",
"Customer",
"Customer Contacts",
"Customer Phones",
"Customer Email",
"Customer",
"Service Address",
"Primary Phone Number",
"Lotus Notes/Presurvey Number"
),
"Created",
If(
SortDescending1,
SortOrder.Descending,
SortOrder.Ascending
)
)
It didn't work I'm afraid. It also didn't break anything. It does exactly what the original code did which is filter successfully based on contents of all fields except the sales team members in the Sales Team Information field.
I'm done for Friday. 😊
I'll try this again Monday.
Oh, and that's more than just a reference. We still have a significant number of business processes that are actively using Notes today.
Hi @DCHammer ,
Try this instead
SortByColumns(
Filter(
AddColumns(
[@'BusMarket - IBC PreSurvey'],
"SalesTeam",
'Sales Team Information'.DisplayName
),
TextSearchBox1.Text in SalesTeam ||
TextSearchBox1.Text in Customer ||
TextSearchBox1.Text in 'Customer Contacts' ||
TextSearchBox1.Text in 'Customer Phones' ||
TextSearchBox1.Text in 'Customer Email' ||
TextSearchBox1.Text in Customer ||
TextSearchBox1.Text in 'Service Address' ||
TextSearchBox1.Text in 'Primary Phone Number' ||
TextSearchBox1.Text in 'Lotus Notes/Presurvey Number'
),
"Created",
If(
SortDescending1,
SortOrder.Descending,
SortOrder.Ascending
)
)
BTW nostalgic reference to Lotus Notes made my day (my weapon of choice a long time ago)
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.
MVP (Business Applications) Visit my blog Practical Power Apps
WarrenBelz
146,587
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional