My powerapps desgin base on canvas.
Because there are too many columns in my sharepoint list, and the range of each column I want to fill is different, so I created three editforms in the same editing screen (Screen2), each editform contains different columns in my sharepint list. .
I have a few questions below:
1. When I want to create an editform, the code with NewForm(Form1) &&NewForm(Form2)&&NewForm(Form3);Navigate(Screen2, UnCover) will cause three lines to be created in the sharepoint list. How can I create one line?
2. In Screen2 ,after i fill out the form. I use SubmitForm(Form1) && SubmitForm(Form2) && SubmitForm(Form3); This causes only one editform content to be saved in the sharepoint list. How can I submit the contents of the three editforms to the same line in the sharepointlist?
Best Regards
Dennis
When you submit Form1, the datasource would be refreshed and so Form2 & Form3 will be refreshed.
So instead of submit form for form2 & 3, you need first update a collection and then update the SP List Item with corresponding SP ID by using either Patch or UpdateIf.
To update the collection, onChange of the controls in form2 & 3,
UpdateIf(mycollection, ID = gallery.selected.ID, {fieldname: value }) // considering you are navigating from a gallery to edit screen.
Finally to update SP List item
SubmitForm(Form1); Patch('SP List', First(Filter(mycollection,ID = gallery.Selected.ID)))
Thanks.
Hi @Dennis_Qiang ,
Do you want to create single one item with your three form data?
Based on the issue that you mentioned, I think you have some misunderstanding on the Edit form in PowerApps. The Edit form is used to create a new record or edit an existing record in a SP List.
If your three Edit forms are in New mode, when you submit your three Edit forms, it would create three separated records within your SP list rather than single one record.
As an alternative solution, I think the Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround (set the OnSelect property of the "Submit" button to following😞
If( Form1.Mode = FormMode.New && Form2.Mode = FormMode.New && Form3.Mode = FormMode.New, Patch('YourSPList', Defaults('YourSPList'), Form1.Updates, Form2.Updates, Form3.Updates), /* <-- Add new record */ Patch('YourSPList', BrowseGallery1.Selected, Form1.Updates, Form2.Updates, Form3.Updates) /* <-- Modify existing record */ )
Please consider take a try with above solution, check if the issue is solved.
Best regards,
User | Count |
---|---|
203 | |
92 | |
83 | |
47 | |
42 |
User | Count |
---|---|
252 | |
105 | |
103 | |
62 | |
57 |