Hello All,
I am exceptionally new to all things PowerApps, and decided to have a go at creating something today... So I'm sure this will be the first question of many!
I've created a blank canvas, and provided four tables as my data source:
Header
MessageDetails
ApprovalDetails
Implementation
I've got a homescreen with a gallery control which loads content from the Header table. I've then got a screen with two edit forms, one for the Header, and one for the MessageDetails. On the SQL database, the Header has a PK of 'Id' with the appropriate Identity Specification, and on the MessageDetails, I have a field called 'HeaderId' which has a relationship to the Header table. All good so far.
On my Save Button, I've got the following:
SubmitForm(HeaderDetailForm);SubmitForm(MessageDetailForm);Navigate(Homepage,ScreenTransition.None)
However, all it does it go to 'Getting data ready ....' but does create the records. Just doesn't return to the homepage.
As a test, I've duplicated my screen and deleted the MessageDetailForm, and the save button works correctly (i.e. returns to the homepage) with the following:
SubmitForm(HeaderDetailForm);Navigate(Homepage,ScreenTransition.None)
So I presume I've done something wrong by submitting the two forms. I can't help but feel I need to pass through the PK from header into the FK field on Message Details. How do I do this?
Any help you can offer in getting the two forms to submit, and passing through the FK, would be greatly appreciated.
Kind Regards,
Dayna