web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter only works once...
Power Apps
Unanswered

Filter only works once on gallery with SQL data

(0) ShareShare
ReportReport
Posted on by

I am attempting to fill a gallery using a filter formula involving input from a text input box. This works initially, but upon saving and publishing, the gallery is never failed when the app actually runs.

 

22cscharff_0-1686710931709.png

 

Above the gallery is the text input I use to fill it. As you can see it is blank, so I created a duplicate text input (not in ss). When I change the filter formula to the other text input the table is filled, but when I save and publish it goes back to being empty. 

 

Here is the settings used in filling the gallery:

22cscharff_1-1686711043737.png

When I switch 'CamPartSearch' for 'Cam_Search_2' (the other text input used for testing) the table is filled, but upon saving/publishing it is empty during running and/or editing until it is switched again. I put a refresh OnSelect in an attempt to try to get it to re-load the SQL data or the gallery so it will actually show, but these attempts have failed.

 

I feel it is important I mention this is on the third screen of my app. The first two use buttons and other SQL data, which eventually leads to this screen. Not sure why the table is always filled when others on the same screen have no issue.

 

Thank you in advance for your help, and please let me know if I need to provide anything else. Thank you!

Categories:
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    It seems like you're experiencing issues with filtering the gallery based on input from a text input box in your Power Apps app connected to SQL data. To troubleshoot and resolve the problem, you can try the following steps:

    1. Verify the Data Source:
    - Double-check that the data source connected to your gallery is properly configured and pointing to the correct SQL table.
    - Ensure that the SQL table contains the expected data and that the column you are using for filtering exists in the table.

    2. Check the Filter Formula:
    - Review the filter formula you're using for the gallery. Make sure it accurately filters the data based on the text input value.
    - Check if any additional filtering conditions are applied that could be causing the unexpected behavior.
    - Test the filter formula by manually entering a specific value instead of using the text input. This will help identify if the issue lies with the formula or the text input itself.

    3. Inspect the Text Input:
    - Confirm that the text input control is correctly bound to a variable or property that holds its value.
    - Ensure that the text input control is not set to default or blank upon saving or publishing the app. Check the control's Default property and ensure it's not affecting the input value.

    4. Refreshing the Data:
    - If your SQL data may change outside the app, consider using a refresh button or an automatic data refresh mechanism to ensure the gallery updates with the latest data.
    - Ensure that the OnSelect property of the refresh button or other refresh trigger contains the appropriate refresh command, such as refreshing the data source or resetting a variable used in the filter formula.

    5. Review App Navigation and Initialization:
    - Double-check the app's navigation and initialization processes to ensure there are no issues with variable initialization, screen loading, or data retrieval.
    - Check if there are any actions or conditions that might interfere with the gallery's visibility or data loading when navigating to the third screen.

    By reviewing these aspects of your app's design and implementation, you should be able to identify any potential issues causing the gallery to not show the filtered data correctly. Make adjustments as necessary and test the app after saving and publishing to ensure the gallery behaves as expected.

  • timl Profile Picture
    37,340 Super User 2026 Season 2 on at

    Hi @22cscharff 

    What's tbl_cam_bom? Is this the name of your SQL Server table or is this a local collection?

    Irrespective  of this, I can't see any point to the call to Collect(tbl_cam_bom, tbl_cam_bom) so I would remove this.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard