
Announcements
I have a screen and on it there is a Form and two galleries, there is a parent child relationship already setup and working for this screen. The issue I am facing is the Attibutes Gallery (Gallery4) has 12 dropdowns and there is a save button in the gallery to save the changes of these dropdowns, it works fine the issue is that if the user doesnt click the SAVE button this information is saved back to the child SharePoint list. I need to have a popup that says you have not saved the item in the gallery.
I know this can be done for the form, but the Submit Form button will handle that just need to be able to show the popup if they want to hit the submit button but the Save button in the gallery has not been saved.
Any help would be appreciated.
Dorinda
Hi @Dorinda ,
Usually when we meet this situation, we will use a variable to save current status. Based on the variable we could modify the edit mode of the save button, so when some work has not been done the value of the variable will be false by default and the save button or navigation button would be disabled.
On your end, for example, you could set this screen OnVisible a variable:
UpdateContext({varSaved: false})
change the value OnSelect of the Save button in the Gallery:
UpdateContext({varSaved: true})
DisplayMode of the submit button:
If(varSaved, DisplayMode.Edit, DisplayMode.Disabled)
OnSelect of the Submit button:
If(varSaved, SubmitForm(YourForm); Navigate(Screen1), Navigate(PopupScreen);Notify("you have not saved the item in the gallery",NotificationType.Error))
This would help navigate to the popup screen with an error message popping up on the top.
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.