Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Navigate to Gallery when Item no longer viewable

(1) ShareShare
ReportReport
Posted on by 181

Hi all.


My gallery is filtered to only show items which have a status.value of "Active"

 

When I edit an item, the SubmitForm is set NOT to navigate away from the form page, however, if I set the status of an item to "Inactive", because this is now hidden in my gallery, I get a blank screen with 'Getting your data ...'

Angry_Sys_Admin_0-1690831012208.png

 

Is it possible to set the submit form to remain on the page if there is data or to navigate back to the gallery page when data is no longer available?

 

Many thanks

Categories:
  • narayan225 Profile Picture
    2,449 Super User 2025 Season 1 on at
    Re: Navigate to Gallery when Item no longer viewable

    @Angry_Sys_Admin 

     

    You can use the following formula for that one.

    SubmitForm(UserGalForm); If(Not(UserGal.Selected.ID),Navigate(HomeScreen));
    //If the item is not there in gallery, it will navigate to HomeScreen

    If the item is still in gallery, it will stay in the same page.

     

    Hope this helps.

     

    Cheers!

  • Angry_Sys_Admin Profile Picture
    181 on at
    Re: Navigate to Gallery when Item no longer viewable

    @narayan225 I updated the formula.


    This now navigates away form the record regardless if the record is still visible in the gallery.


    I need it to work so, if im just updating the record, which remains visible on the gallery, after form submission we remain on the edit form page.

     

    If I am, for example, closing a task which, once closed is filtered from the gallery, I need it to navigate back to the home screen on form submission 

  • narayan225 Profile Picture
    2,449 Super User 2025 Season 1 on at
    Re: Navigate to Gallery when Item no longer viewable

    @Angry_Sys_Admin 

     

    I realise that you don't actually need to compare the id to blank. Can you try updating the formula to following.

    SubmitForm(UserGalForm); If(UserGal.Selected.ID,Navigate(HomeScreen));

     

    Hope this helps.

     

    Cheers!

  • Angry_Sys_Admin Profile Picture
    181 on at
    Re: Navigate to Gallery when Item no longer viewable

    @narayan225 Thank you for your reply.

     

    I have implemented this but still will not navigate away from the screen when the ID no longer exists:

     

    SubmitForm(UserGalForm); If(UserGal.Selected.ID = Blank(),Navigate(HomeScreen));
  • narayan225 Profile Picture
    2,449 Super User 2025 Season 1 on at
    Re: Navigate to Gallery when Item no longer viewable

    @Angry_Sys_Admin 

     

    If your gallery is connected to datasource, the list refreshes when you submit the form. And the form cannot display anything as the referenced id for the form doesn't exist in the gallery anymore.

     

    You can use if condition to check if the item exist in the gallery and navigate based on that condition.

    SubmitForm(editForm);If(Gallery4_1.Selected.ID = Blank(),Navigate(Screen1));

    This runs after submitting the form and navigates to screen1 if the item doesn't exist in the gallery anymore.

     

    Hope this makes sense.

     

    Cheers!

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard