cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ILoveSD
New Member

Filtering SharePoint List in PowerApp

Hi Everyone,

 

I've been creating a PowerApp that is connected to a SharePoint list for the data and I'm having some trouble finding the right magic to filter the list the way the users want.

 

The current Date/Items code is: SortByColumns(Filter(SOGI, StartsWith(ComplianceAssetId, TextSearchBox1.Text)), "ComplianceAssetId", If(SortDescending1, Descending, Ascending))

 

I've Googled and Binged for filtering techniques and I've tried a few of them with no luck.

 

This SharePoint list contains 4 People Picker columns:

 

  1. "Created" which translates to "Created"
  2. "Development Officer" which translates to "DO%5Fx0020%5FSubmitted%5Fx0020%5FFor"
  3. "Prospect Manager" which translates to "Prospect%5Fx0020%5FManager"
  4. "Constituent Development Officer" which translates to "Constituent%5Fx0020%5FDevelopment%5Fx0"

When my users are viewing the list in the PowerApp, they only want to see items where they are listed in any of these 4 columns.

 

I tried several samples and none of them worked, even just for the Created field.  I must be doing something wrong with the formula.  Can anyone help?  Thanks so much!

4 REPLIES 4
Anonymous
Not applicable

Hi @ILoveSD

 

If you want the user to see only when one of the 4 people field column contains them you can use a function similar to this.

 

First in the Screen.OnStart or Screen.OnVisible put this formula

 

 

Set(
  _UserProfile,
  User()
)

 

 

Now in Gallery.Items put this formula:

 

Filter(
  SOGI,
  Author.Email = _UserProfile.Email ||
  DO%5Fx0020%5FSubmitted%5Fx0020%5FFor = _UserProfile.Email ||
Prospect%5Fx0020%5FManager = _UserProfile.Email ||
Constituent%5Fx0020%5FDevelopment%5Fx0 = _UserProfile.Email )

 

Column Created is a date column not a person. Author in PowerApps is the same as Created By column in SharePoint List. Also I assume that for example DO%5Fx0020%5FSubmitted%5Fx0020%5FFor is the column name in PowerApps?

 

Hi MartynasJurkus

 

Thanks so much for the information.  Yeah, I meant Created By.

 

So I think that I plugged in the values correctly, however it still does not render the list items as one would think.

 

mySOGIdev.png

 

It seems to not like "Email" after Author or any of the = signs.  Perhaps it is just bad luck day 😞

 

Undoing the change and putting it back makes the list work again, but it is not filtered.

capture 4.PNG

 

Thanks!

Even just trying to filter on one attribute doesn't work for me.  I'm stumped.

 

mySOGIdev1.png

Hi @ILoveSD,

 

That should be related to delegation.

Currenlty the Lookup type from SharePoint list is not supported for delegation.

There are threads talking about this.

And we have collected this as a feedback.

For more information about delegation, please check:

Understand delegation

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (78,357)