Hi folks,
we have a PowerApp in development which shows records from the Dataverse in a gallery view.
By clicking on a record entry, a page ("General") opens, where some fields are available to edit the record, existing data is loaded into these fields.
We also have a functionality in our app to create whole new records. This functionality links the same "General" page where the same fields are available, but empty.
By clicking on the save button on the "General" page, a patch function runs to create the record in the Dataverse.
So far, so good.
We want to keep the page opened after the patch with the data from the newly created record shown (so technically close the "create page" and open the "edit page" with data from the new record).
But currently all data will be removed from the fields after the patch, so the page is shown in "create form" again.
Any advice on how to achieve this?
We already tried several things, which worked also out in the editing mode, but after publishing the app, a lot of error messages were thrown...
Open the Create page:
Create_Button.OnSelect = Set(selectedRecord; Defaults('Meeting Minutes'));;
Navigate(General);;
General_Form_BasicFields.Items = selectedRecord
Function on the Save button:
Save_Button.OnSelect =
If(
IsBlank(Validate('Meeting Minutes'; selectedRecord; General_Form_BasicFields.Updates; General_Form_Description.Updates; General_Form_Subject.Updates ));
//true
Set(selectedRecord; Patch('Meeting Minutes'; selectedRecord; General_Form_BasicFields.Updates; General_Form_Description.Updates; General_Form_Subject.Updates);;
EditForm(General_Form_BasicFields);;EditForm(General_Form_Description);;
EditForm(General_Form_Subject);;
Notify("Your Meeting Minutes was created successfully.";
NotificationType.Success
);
//false
Notify(
First(Errors('Meeting Minutes')).Message;
);;
)
Any advice is appreciated!
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
MS.Ragavendar
72