
Hi all,
I have a app for a team to manage requests. There is the usual screens for the user to raise a new request and check in on the current status. For the team, they have two primary screens, an "Open request" screen and a "Closed request" (just to filter out all closed and provide proper numbers for open work in the dashboards.
The way these screens work is there is a gallery which filters either open or closed items (from a SharePoint list) depending on what screen you are on. When you select an item, the gallery disappears using an UpdateContext variable on the visibility property of the gallery, makes the underlying form visible (again with a second ContextVariable).
The issue I have run into, is that when the team change the status from "In Progress" to "Complete", it obviously moves the open item into the closed screen based on the gallery filter.
My question is, is there a way to add a formula on the save button of the form so that if status is equal to "Complete", you can navigate to the completed screen and load that current item (based on ID field) but at the sae time, trigger the UpdateContext visibilities for the closed gallery and the closed form so that the user can still see the current data without having to navigate to the closed screen, find the item they were just working on, and check it all looks good?
Any assistance is appreciated.
Thanks,
DW
Hi DW,
Im not 100% sure i got your problem but I hope this can at least help you to find the solution,
So I understand that you want to navigate automatically to the closed requess screen when a user saves a request with status chaged to Complete, and also load the same item they just changed into the form in that new screen, you can use a formula on the save button that:
Checks if the status is "Complete".
If true, navigates to the closed requests screen.
Loads the current item based on its ID.
Updates the context variables to manage the visibility of the gallery and form on the closed requests screen.
You should use a formulate similar to this one in the on save button
If(
DataCardValueStatus.Selected.Value = "Complete",
Navigate(ClosedRequestsScreen),
Set(CurrentItem, ThisItem),
UpdateContext({showClosedGallery: false}),
UpdateContext({showClosedForm: true})
);
SubmitForm(FormName);
Also youll have to configure the OnVisible Property of the Closed Requests Screen
UpdateContext({showClosedGallery: true, showClosedForm: false})
And then please make this changes in your objects for the Gallery Visible Property showClosedGallery for the form visible property showClosedForm and finally for the item form property CurrentItem
By implementing these changes, when a user saves a request with the status changed to "Complete", the app will automatically navigate to the closed requests screen, load the same item in the form, and update the visibility of the gallery and form appropriately.
This should provide a seamless experience for the team, allowing them to see the updated request without additional navigation steps.
If this is not what you are looking for, I will require some additional details or screenshots of how your components work to give you a more accurate answer.
Regards.