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 / Navigate between pages...
Power Apps
Answered

Navigate between pages if no table data in collection

(0) ShareShare
ReportReport
Posted on by 129

Hi,

 

I have a collection named ColUpdate who collect all data from an edit in my gallery. If I want to navigate between other pages, ColUpdate need to be blank, if not I can't switch page.

 

How can I do that ?

 

Thanks,

Tom Victor

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @TomVictor ,

     

    There are many ways to achieve this. For example suppose you have a button which navigates the user to a specific screen, you can apply the below to the DisplayMode property of the button.

     

    If the Collection is empty, the button is enabled, otherwise it will be disabled.

     

    If(
     CountRows(ColUpdate) = 0,
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution

    If you like my response, please give it a Thumbs Up.

  • CU22081303-0 Profile Picture
    150 on at

    I misunderstood the question. I thought you were asking how to clear the collection, not how to restrict the page navigating. Leaving my answer here in case it can help someone, but please disregard.

     

    Hi, this should be what you need:

     

     

    ClearCollect(ColUpdate,Blank())

     

     

    Make a button with that code to clear the collection, or call that function before navigating:

     

    ClearCollect(ColUpdate,Blank());
    Navigate(SomeScreen);

     

     

  • CU22100725-0 Profile Picture
    129 on at

    Hi @Amik ,

     

    Thanks for your help it works very well !

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard