cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CAlvy
Helper III
Helper III

Gallery filter works in studio but not in app

In my canvas app I have three 'dashboard' screens which are set up the same but using different data. The galleries use a Filter function and that references a few combo boxes and two check boxes per screen. There are no delegation warnings.

In Studio, all filters work fine. In the published app only the combo box filters work on two screens. Selecting the check boxes should still display records but no records appear. However, on one of the screens, one of the checkboxes does work.

Also, it worked for a period of time yesterday in the app.

I haven't got any preview or experimental features turned on. Is there anything else I can try?

I do have warnings that I have too many controls on each screen. Could that be it?

1 ACCEPTED SOLUTION

Accepted Solutions
CAlvy
Helper III
Helper III

Update: I believe there is a bug related to using my search box component in the gallery filter. If I remove code referencing it from my formula, the published app works perfectly fine. I replaced the component search box with a classic text input box and this works too. So my best bet is to not use the component!

View solution in original post

12 REPLIES 12
FLMike
Multi Super User
Multi Super User

@CAlvy 

 

Hey my car stops doing its thing, can you tell me why 🙂 no because I have no details on the car.

 

Please add code and pictures.

Item properties

Filters

Screenshots, you name it.


If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

Cheers

Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey

True! 🙂

Item for gallery:

SortByColumns(Filter(colProjectDashboard,
And(
Or(
IsBlank(ComboBox_Approver_3.Selected.Value),
IsEmpty(ComboBox_Approver_3.SelectedItems),
'Approver Name' in ComboBox_Approver_3.SelectedItems),
Or(
IsBlank(ComboBox_Checker_3.Selected.Value),
IsEmpty(ComboBox_Checker_3.SelectedItems),
'Checker Name' in ComboBox_Checker_3.SelectedItems),
Or(
IsBlank(ComboBox_DocOwner_11.Selected.Value),
IsEmpty(ComboBox_DocOwner_11.SelectedItems),
'Originator Name' in ComboBox_DocOwner_11.SelectedItems),
Or(
IsBlank(ComboBox_CTR_7.Selected.Value),
IsEmpty(ComboBox_CTR_7.SelectedItems),
'Package Number' in ComboBox_CTR_7.SelectedItems),
Or(
IsBlank(ComboBox_MilestoneOwner_3.Selected.Value),
IsEmpty(ComboBox_MilestoneOwner_3.SelectedItems),
'Linked_Deliverable: Owner'.Value in ComboBox_MilestoneOwner_3.SelectedItems),
Or( 
IsBlank(ComboBox_Receiver_3.Selected.Value),
IsEmpty(ComboBox_Receiver_3.SelectedItems),
ComboBox_Receiver_3.Selected.Value in Concat('Linked Interface:ReceiverName_Text', Value, "; ")),
Or(
IsBlank(ComboBox_Sender_3.Selected.Value),
IsEmpty(ComboBox_Sender_3.SelectedItems),
ComboBox_Sender_3.Selected.Value in Concat('Linked Interface:SenderName_Text', Value, "; ")),
Or(
IsBlank(ComboBox_DocStatus_3.Selected.Value),
IsEmpty(ComboBox_DocStatus_3.SelectedItems),
ComboBox_DocStatus_3.Selected.Value in 'Late-Due'),  
Or(
IsBlank(ComboBox_MilestoneStatus_3.Selected.Value),
IsEmpty(ComboBox_MilestoneStatus_3.SelectedItems),
ComboBox_MilestoneStatus_3.Selected.Value in 'Linked_Deliverable: Status'.Value),
Or(
IsBlank(ComboBox_InterfaceStatus_3.Selected.Value),
IsEmpty(ComboBox_InterfaceStatus_3.SelectedItems),
ComboBox_InterfaceStatus_3.Selected.Value in 'Linked Interface:Status'.Value),
Switch(Checkbox_Milestones_3.Value, true, !(IsBlank(Linked_Deliverable.Value)), Checkbox_Interfaces_3.Value, true, !(IsEmpty('Linked Interface'))), 
Component_SearchBox_5.SearchValue in 'Document Title' ||
Component_SearchBox_5.SearchValue in 'Primary Document Number' ||
Component_SearchBox_5.SearchValue in Linked_Deliverable.Value ||
Component_SearchBox_5.SearchValue in Concat('Linked Interface', Value, "; ") ||
Component_SearchBox_5.SearchValue in Concat('Linked Interface:Status', Value, "; ")))
,"DaysLateNumber" , SortOrder.Descending)

It's this Switch which isn't working properly

Switch(Checkbox_Milestones.Value, true, !(IsBlank(Linked_Deliverable.Value)), Checkbox_Interfaces.Value, true, !(IsEmpty('Linked Interface')))

Screenshot of app failing:

CAlvy_0-1720541527393.png

Issue I'm getting in the app checker: Too many controls on a screen. Complexity is 367 where the maximum threshold recommended is 300

Hope that helps.

 

@CAlvy 

 

Thanks!! let me look at it now, much better btw truly appreciate you being a good sport 🙂 My old man eyes thank you too hehe

 

 

Hi @CAlvy 

 

Clarifying questions

1. when you say it works in Studio, I am assuming you mean when you are testing it? So in that case you are probably an admin in that environment and possibly an admin on the data?

 

2. When the others test it, or if you also mean it doesnt work for you when Published. Does it point to the same location?

 

Usually when filters etc fail its for 3 reasons

1. You have a bug and are lucky it works in Dev

2. You have a data issue in the environment that the app points too when Not in dev

3. You have a permissions / security / Auth / AuthX / Role / Environmental Config etc issue where you dont see it in Dev because you are using Dev data and its all nicely popluated

 

As long as you mean, I publish and then I run the published app and it doesn't work

 

While I review, please do this.

Step 1. Close your App (stop it running)
Step 2. Go to the Apps list in your environment
Step 3. Find your App and click the 3 ... to get the popup menu

Step 3b. Click on Run monitor
Step 4. Once Monitor is running in its own tab, Click the button that says Play Published Version/App
Step 5. Go to the place in your app, but don't trigger the issue yet, or even if it already did the second you got to the screen ignore it.

Step 5b. Go to Monitor and Choose Clear Data in the Top Left Corner
Step 6. Cause the Issue to happen, but only click the one check box


Step 7. Go to the Monitor and Filter (top right) based on Error, or key word. Go to the line or lines that match this
Step 8. Look at the Response Tab and you will have to expand the Body > and the Header >. Then look at the body to see more details on the error
Do this for each line you find

Now if there are no errors, then do a Filter on your query, so a name of a control or the items property or the name of the control

And walk through all the Lines of course it does

 

Just to make sure you aren't hitting some weird permission issue.

=================================================================

Next, if this is a different environment, then verify that you have data in that environment that would actually meet your criteria.

 

I will keep looking at your Filter, especially since I now have the details of it.

Sorry for the spam. When you say its not working

Can you tell me which Contols are tied to that?

Hi @CAlvy 

 

I am trying to determine what you were trying to get out of this

Switch(Checkbox_Milestones_3.Value, 
    true, 
        !(IsBlank(Linked_Deliverable.Value)), 
    Checkbox_Interfaces_3.Value, 
        true, 
    !(IsEmpty('Linked Interface'))
), 

 

So if CheckBox_milestones_3.value

When true

return the boolean value of Linked XXXX

 

When XXXInterfaces is true,

    return true

 

and

Isempty bla bla returns a boolea

 

 

But what are you using the boolean for to compare against other than its just true or false?


If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

Cheers

Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey

 

Hi @FLMike , thanks for having a look and providing some help.

 

Yes, that's right. It's the same for me and other users when testing in the app. I don't think it's to do with environment or data permissions. The data source is SharePoint. I should have also pointed out that this all used to work fine - the checkboxes used to display the items for myself and users.

 

I used the Monitor but no errors came up and there wasn't anything unusual with the controls. There are lookups that occurred and warnings which are just 'Formula not delegated' and advising how many rows are scanned but nothing else that looks like a problem. I also tried it with the checkbox that did display items. The only difference was more lookups.

 

In terms of the Switch function, it might not have been the best way of doing this but I couldn't find another way. Essentially my gallery items data has two lookup columns - one links to 'milestone' data in another SharePoint list and the other to 'interface' data also in SharePoint. When the user selects the Milestone checkbox, they should be able to see on the dashboard all the items which have a lookup to a milestone. The same for the Interface checkbox. If selecting both, they should see items where there is a lookup to milestone and interface. Perhaps there's a better way I can write this into the formula?

How @CAlvy  about this

 

Yeah the issue I see though is that just having a boolean value, provides no value to the query.

 

 meaning

 

Filter('source', a = b, true) doesn't do anything and based on where your ( ) are, thats all your providing is the word true or false.

 


If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

Cheers

Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey

Yes, I think it's actually excluding the linked records from the gallery. I added a count of records to the dashboard. On one of the dashboards I only had 1 record linked (to both a milestone and interface). Although I have 97 records, it was only displaying 96 without any filters. I linked another record and it displayed 95. However, if I search for the linked record, it will display it and then the checkboxes do work. 

 

I will remove the Switch and test again to see if that is the cause of the issue.

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,458)