cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DecoyGOODz
Frequent Visitor

filter gallery by text with delegation

I'm trying to create what I though was a simple gallery but I can't seem to figure out a formula that will give me the needed result without delegation warnings. The SharePoint data source will grow much larger than 2000 items. 

 

My gallery is linked to a SharePoint list. The list has a number column called, "Workorder Item ID". That column holds the ID of a related item in a separate SharePoint list. I need the gallery to show only the items that have a specified number. 

 

Here is my formula that gets delegation warnings:

Filter(
'Backshop Tasks',
Value('Workorder Item ID')=varItem.ID
)

 

varItem is a record variable. varItem.ID gives the number that I need to display.

If I remove the Value() function. I don't get the delegation warning but 'Workorder Item ID' doesn't display a value without it.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @DecoyGOODz ,

@Pstork1 is correct here - two options

With(
   {wID: Text(varItem.ID)},
   Filter(
      'Backshop Tasks',
      'Workorder Item ID' = wID
   )
)

OR (a much better idea) change the 'Work Item ID' column to numeric.

 

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

View solution in original post

5 REPLIES 5
iAm_ManCat
Super User
Super User

Heya!

 

You could try switch it the other way around and compare text to text (we are converting the right side to text by appending it to a blank text item):

 

Filter(
'Backshop Tasks',
'Workorder Item ID'= ("" & varItem.ID)
)

 

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Pstork1
Dual Super User
Dual Super User

What type of column is Workorder Item ID?  number, single line of text, Lookup? You'll need to find a way to get rid of the Value() function.  so focus on removing that and getting the variable into the right type to compare to it.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
WarrenBelz
Super User
Super User

Hi @DecoyGOODz ,

@Pstork1 is correct here - two options

With(
   {wID: Text(varItem.ID)},
   Filter(
      'Backshop Tasks',
      'Workorder Item ID' = wID
   )
)

OR (a much better idea) change the 'Work Item ID' column to numeric.

 

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

Thank you so much! your formula worked perfectly.

I've been working at this for longer than I'd like to admit and have changed the 'Workorder Item ID' column back and forth between text and number in attempts to get this to work the way I needed.

Would I need to change your formula if I changed it back to number?

Hi @DecoyGOODz ,

Yes - it would just be

Filter(
   'Backshop Tasks',
   'Workorder Item ID' = varItem.ID
)

and also be delegable with any number of records.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,922)