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'));;
General_Form_BasicFields.Items = selectedRecord
Function on the Save button:
IsBlank(Validate('Meeting Minutes'; selectedRecord; General_Form_BasicFields.Updates; General_Form_Description.Updates; General_Form_Subject.Updates ));
Set(selectedRecord; Patch('Meeting Minutes'; selectedRecord; General_Form_BasicFields.Updates; General_Form_Description.Updates; General_Form_Subject.Updates);;
Notify("Your Meeting Minutes was created successfully.";
Any advice is appreciated!
Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.
Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!
Check out the new Power Platform Community Connections gallery!