cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SinLeeNg
Frequent Visitor

In a Canvas App, how to build a form that writes to multiple tables?

Hello everyone,

 

I have a scenario with the following requirements for a form, say it is regarding records about Animals:
- on new/edit Animal form, allow upload of max one Excel file, saved to DataVerse

- however, on edit Animal form, the Excel file uploaded should not overwrite the existing Excel file

- when viewing the Animal record, the canvas app should only show the latest Excel file

 

So, over time as the user edits the record, in DataVerse there should be a history of Excel files per Animal record and a way to download these Excel files.

 

I am thinking that most likely the Excel files are stored in another table, with a lookup to the Animals table, hence the subject of this question. However, I may be wrong and I hope to be enlightened and get help on building out the form.

 

Thank you all in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Forms can't be bound to more than one table.  So you won't be able to use SubmitForm().  YOu can use multiple Patch() statements to create or update records in multiple tables at the same time using a form or forms for the data.  Its more work, but Patch gives you the control you need to save things to multiple tables.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Pstork1
Dual Super User
Dual Super User

Forms can't be bound to more than one table.  So you won't be able to use SubmitForm().  YOu can use multiple Patch() statements to create or update records in multiple tables at the same time using a form or forms for the data.  Its more work, but Patch gives you the control you need to save things to multiple tables.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,518)