2

I would like to apply some type of interim update without closing a SharePoint form customized in PowerApps. I currently have SubmitForm(MainForm) on the MainForm. The form has several lookup columns that get automatically filled upon selection of a value in one of the columns. Works great when using Quick Edit without the PA form.

On the PA form: In the same screen, how do I click an UpdateButton on MainForm that surfaces the autofilled values in SecondaryForm without closing the entire screen? I want users to visually confirm the updates before clicking a second button (SubmitForm(MainForm)) that then submits, closes, and returns to the SP List.

I used SubmitForm(SecondaryForm.Updates) and that populates the values after I’m done updating MainForm…but then the whole form closes because of the SubmitForm(MainForm). What can I use for that interim update on MainForm without closing it?

1 Answer 1

0

You could do a Patch with the needed updates, that wont close the form. The Patch funciton is well documented here: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

However, if the users just have to confirm their input, you could just display the data (and if needed fetch the lookup data) without patching or submitting the data. That is what I would recommend, otherwise you potentially have to delete data also in case that the users cancel the input alltogether :)

5
  • I want to do the second part ("users just have to confirm their input,")...as stated I tried with SecondaryForm.Updates but the customized form autofill does not "activate" until I click the submit button. I want the autofills to occur the moment I select a value in the main lookup field they are based on. The desired action (autofill after selecting a lookup value) does occur when editing in the regular SP List though, just not in the customized form. I do not want to use Patch if I can help it. Commented Dec 7, 2021 at 1:36
  • Aha ok, makes sense. In the field that eventually gets auto populated you could set the Default value to something like this: LookUp(myDataSource, Color = Dropdown1.Selected.Value).code In this case I want to set the field value depending on what the user has selected in Dropdown1 by making a lookup into the data source of the field. In this case i want to display the RGBA code for the color selected. EDIT: If you want you are welcome to send screen shot to give a better answer :)
    – RuneBH
    Commented Dec 7, 2021 at 16:29
  • Thank you for the suggestion: I will try it and report back here Commented Dec 8, 2021 at 0:36
  • So I tried it and got "Incompatible types for comparison...Record, Text". In PA all the fields that get auto populated are combo boxes (not sure if this matters in this particular case) and so is the lookup field. In the SharePoint List they are lookup fields, and in the source SP List for all the lookups, all the fields are single line of text. Thank you Commented Dec 27, 2021 at 16:01
  • Ok, it matters what type of control is used in the PA. So you are correct about that :) Im not too sure what you want to display to the users before you submit the form. But I assume its the input from the form based on your message above. If you want to display input from a combobox your need to make the selected values into a string. You can do like this: < Set(varSelectedItems, Concat(ComboBox1.SelectedItems, Value,"; ")); > Where the "varSelectedItems" is the string you can display in a label and "Value" is the value from the combo box.
    – RuneBH
    Commented Dec 27, 2021 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.