Reputation: 992
We have a powerapps SharePoint List form where there is a button in the New Item Form.
On Click of said button, the item needs to be saved and should redirect to the Edit item form for the same item.
We tried IF(SubmitForm(NewForm),Navigate(EditForm))
in the button click properties.
On clicking the button the item got saved. But instead of opening the Edit form of the saved item, it is opening the Edit Form of whatever item got edited last in the list.
Please help
Upvotes: 1
Views: 4988
Reputation: 4365
Try this:
OnSelect
: SubmitForm(<FormName>)
OnSuccess
: Set(varLastSubmit, <FormName>.LastSubmit)
Item
: If(!IsBlank(varLastSubmit),varLastSubmit)
Caveat:
NewForm(<FormName>)
- If you delete the record you're currently working on, this will throw an error "Item not found" and you'll need to hit the Reset button as well
Upvotes: 5