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 ...'
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
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!
@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
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!
@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));
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!
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional