cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChrisShelley
Regular Visitor

Filtering a gallery by a column value as a default

Good Evening,

 

I have a gallery that I only want to display information on a record if a value in record is marked as "Yes", I have attempted modifying the filter already present in the record with DataCardname="Yes" but no luck.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ChrisShelley ,

Could you please show more details about the error message? Do you face a Delegation warning issue within your formula?

 

If the "ReadyForCompounding" column is a "Yes/No" type column in your SP List, I think the formula above I provided could not produce an error. It would cause a Delegation warning issue within your Filter formula.

 

Please note that the Delegation warning issue is not an error, it just means that you could not delegate the data process to your SP List itself, instead, you could only process your data locally in your app. You could only process 2000 records at most locally in your app.

If the amount of your SP List records is not more than 2000, you could ignore this warning issue.

Note: Please set the "Data row limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app.

 

If you want to get rid of this Delegation warning issue, as an fixed solution, you could consider change the data type of your  "ReadyForCompounding" column from "Yes/No" into Choice type (with two available options -- "Yes" and "No"). Then you could modify your Filter formula as below:

SortByColumns(
               Filter(
                      [@'Product Tracker'], 
                      ReadyForCompounding.Value = "Yes",    // Modify formula here
                      StartsWith(Title, TextSearchBox1_2.Text)
               ), 
               "Title", 
               If(SortDescending1, Descending, Ascending)
)

above formula would not cause Delegation warning issue.

 

Best regards,

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

View solution in original post

11 REPLIES 11
WarrenBelz
Super User III
Super User III

Hi @ChrisShelley ,

I am assuming your field is a yes/no field in SharePoint?

Filter(
   YourListName,
   YourFieldName=true
)

 

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.

 

WarrenBelz
Super User III
Super User III

Hi @ChrisShelley ,

Is your field a Yes/No field in SharePoint - try

Filter(
   YourListName,
   YourFieldName=true
)

 

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.

This is what was autogenerated on creation of the power app in Gallery Data Items

 

SortByColumns(Filter([@'Product Tracker'],StartsWith(Title, TextSearchBox1_2.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

When I change to

 

SortByColumns(Filter([@'Product Tracker'], ReadyForCompounding=True, StartsWith(Title, TextSearchBox1_2.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

Nothing changes, true or false

 

when I change to

 

SortByColumns(Filter([@'Product Tracker'],ReadyForCompounding=true))

 

True or false the information goes away in the gallery

 

What is the correct syntax for allowing search function to work and for only records holding ReadyForCompounding=True to be viewable

@ChrisShelley ,

Get rid of the SortByColumns as you have not specified any columns. This should work

Filter(
   [@'Product Tracker'],
   ReadyForCompounding=true
)

 

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.

Hi @ChrisShelley ,

Could you please share a bit more about the "ReadyForCompounding" column in your SP List? Is it a Yes/No type column?

 

If the "ReadyForCompounding" column is a "Yes/No" type column in your SP List, I think this is the issue within your formula. Actually, it is an known issue with "Yes/No" type column in SP List. Please check the following blog for more details:

https://rezadorrani.com/index.php/2019/04/14/powerapps-filter-sharepoint-yes-no-column-bug/

 

Please consider modify your formula as below:

SortByColumns(
               Filter(
                      [@'Product Tracker'], 
                      ReadyForCompounding <> false,    // Modify formula here
                      StartsWith(Title, TextSearchBox1_2.Text)
               ), 
               "Title", 
               If(SortDescending1, Descending, Ascending)
)

Note: Within canvas app, it use true/false as Boolean value rather than True/False

 

Best regards,

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

@ChrisShelley ,

@v-xida-msft is correct here - I must have been getting tired.

I utilized the formula on two different screens and not seeing change.  On one screen with the formula the item disappears and will not come back when formula switches back and forth true/false.  The other screen does not change regardless.  This is a Yes/No question in sharepoint.

Hi @ChrisShelley ,

If the ReadyForCompounding field is a Yes/No type column in your SP List, I think above formula I provided could achieve your needs:

SortByColumns(
               Filter(
                      [@'Product Tracker'], 
                      ReadyForCompounding <> false,    // Modify formula here
                      StartsWith(Title, TextSearchBox1_2.Text)
               ), 
               "Title", 
               If(SortDescending1, Descending, Ascending)
)

Also please try the following formula:

SortByColumns(
               Filter(
                      [@'Product Tracker'], 
                      ReadyForCompounding = 1,    // Modify formula here
                      StartsWith(Title, TextSearchBox1_2.Text)
               ), 
               "Title", 
               If(SortDescending1, Descending, Ascending)
)

Note: Please make sure the 'Product Tracker' is your SP List rather than a Collection.

 

In addition, if there still no items appear within the Gallery, please type some Text within the Search Box, then remove these typed Text again from the Search Box, check if the issue is solved.

 

Best regards,

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

Changing the logic test to <> or = 1,0 only produces errors in the programming and does not yield any results. 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

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 (105,388)