
Hi Experts,
I am working on PowerApps form creation & edit using gallery control.
In screen 1 , i have a create new button which navigate to newform control and in screen 2 i have a edit button which navigate to same form with edit control (tried edit control with different form also but no luck)
When i play the form , it works fine if i click edit button first , but once i go to create new it will open as a newform and then go back .. after that again if i go to edit button , this time newform only opened not edit control of selected gallery.
Hope you understand my point .
So if it happens i have to refresh the browser and then again start playing.
I want to fix this asap .
Please help to sort it out .
Thanks
DK
My suggestion would be to use a single form, edit or new does not matter. You set the form type with the button OnClick property.
On Screen 1, the OnClick property of the New Button should be something like:
NewForm(FormName);
Navigate(FormScreenName);
On Screen 2, the OnClick property of the Edit Button should be something like:
EditForm(FormName);
Navigate(FormScreenName);
For the Item property of the Form, you can use a Context Variable that is set in the OnClick property of each of the buttons.
The New Button you would update to:
NewForm(FormName);
Navigate(FormScreenName,ScreenTransition.None,{formRec:Blank()});
And the Edit Button you would update to:
EditForm(FormName);
Navigate(FormScreenName,ScreenTransition.None,{formRec: ThisItem})
Let me know if that helps.