cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
v-sttaub
Level: Powered On

can Filter on some items but can't on others

Hi All.

 

I'm filtering a sharepoint list in a powerapps data table. Some fields filter perfectly, some not at all and I can't by default show all records

  • Some of the fields in the datatable are using SP lookup fields. Can PowerApps filter an SP field setup as a lookup field?
  • I then try to default to all records. Nothing. I tried using the ID field which shows >0 as default to show all records where the ID field is >0, but all records didn't appear.

Here is the filtering that works

  • If(FieldType ="Executive", Filter(Dataset,ExecutiveOwner=txSearchFieldsDetailsSp.Text),
    If(FieldType ="Remediation", Filter(Dataset,RemediationOwner=txSearchFieldsDetailsSp.Text),
    If(FieldType ="Resolution", Filter(Dataset,Resolution=txSearchFieldsDetailsSp.Text),

Here's the one where if the user chooses all, I want the entire dataset to appear. I tried both and neither worked

  • If(FieldType ="All", DataSet)
  • If(FieldType ="All", Filter(Dataset,ID>0,

This last filter is being ignored.

 

 

 

Help is sincerely appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: can Filter on some items but can't on others

Could you please explain a bit for the FieldType here, it is a field from the SharePoint list, or a Variable defined in your App?

 

Assuming the FieldType is a Variable defined in your App, then you should be able to change the formula as below:

If(
FieldType ="Executive",
Filter(Dataset,ExecutiveOwner=txSearchFieldsDetailsSp.Text), FieldType ="Remediation",
Filter(Dataset,RemediationOwner=txSearchFieldsDetailsSp.Text), FieldType ="Resolution",
Filter(Dataset,Resolution=txSearchFieldsDetailsSp.Text), DataSet)

To have the filter work.

 

If the FieldType is a field in your SharePoint List, then you should put it within the Filter() function.

 

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.
2 REPLIES 2
Community Support Team
Community Support Team

Re: can Filter on some items but can't on others

Could you please explain a bit for the FieldType here, it is a field from the SharePoint list, or a Variable defined in your App?

 

Assuming the FieldType is a Variable defined in your App, then you should be able to change the formula as below:

If(
FieldType ="Executive",
Filter(Dataset,ExecutiveOwner=txSearchFieldsDetailsSp.Text), FieldType ="Remediation",
Filter(Dataset,RemediationOwner=txSearchFieldsDetailsSp.Text), FieldType ="Resolution",
Filter(Dataset,Resolution=txSearchFieldsDetailsSp.Text), DataSet)

To have the filter work.

 

If the FieldType is a field in your SharePoint List, then you should put it within the Filter() function.

 

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.
v-sttaub
Level: Powered On

Re: can Filter on some items but can't on others

Thanks for your help, Michael. that was very helpful.

I guess this is a part 2 question but I noticed that when I have a sharepoint list in my powerapps and i do a filter on the lookup field in my Sharepoint list, it doesn't work.  I seem to be able to only filter on fields that aren't set as lookups.

 

I have a drop down containing my fields and when the user chooses an item, it populates another drop down with the unique values from the table.  It works fine when the column isn't a lookup from another sharepoint list, just text a user entered. 

 

I get a screen print of the message which is

"The colums produced by this rule are all nested tables and/or records, however, the property expects at least some columns of simple values (such as text, or numbers)"

 

Have you seen this and if so, what's the solution?