cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jaylou
Kudo Commander
Kudo Commander

submit multiple forms

Hi All,

I have an app with 7 forms to collect data from one SPO list, which I would like it to update that item in the app.  

PA does not support submitting multiple forms, so I am in need of a way to submit all forms after all 7 are filled out.

 

Example:

1) App opens, showing a dropdown selection of regions

2) I choose a region and I get a listing of all locations in that region

3) I choose a location and it shows EditForm1

4) Editform1 has weekday amounts, I changed the submit button to Navigate(EditForm2)

    EditForm2 has weeknight amounts, I changed the submit button to Navigate(EditForm3)

    Editform3 has weekend amounts, I changed the submit button to Navigate(EditForm4).

5) Editform 7 has the submit button, where I would like to patch() updating the current record in the app.

 

I am trying to use Patch(), but I can only figure out how to insert a new row into the list, not update all columns of the current item from my forms.  

Any and all help would be greatly appreciated.

TIA,

Joe

 

14 REPLIES 14

Thank you!!!  That was driving me crazy!!!

I didnt realize OnSuccess was set to back().  now it all makes sense and I am ready for my next app!!!

 

Thanks again @Anonymous and @Drrickryp for all your help, I couldn't do it without your help and this forum.

 

Joe

 

Hi @Anonymous,

I was asked to add 2 new dropdown columns to my lists and App.  

I added the columns to the app, then added them to my hidden form. 

In the default on the hidden form I added PgkTranRateType.selected and PkgMonthRateTye.selected.  (I've tried to use Selected.value but it errors on me and does not allow me to proceed).

When I am in edit mode, I hit the play button and enter the data going from one form to the next.  on the last form I have my SubmitForm(hidden_form),  all the old columns are still updating the list as I expected, but the 2 new dropdown are not being populated.  When I look at my hidden form, the data from the unhidden columns are displayed properly, including the 2 new dropdown values.  It seems like the SubmitForm() is not seeing the new columns.  Is there anything special to submit a dropdown column?  Or is there somting special I need to do so the form know about new columns?

 

In my Patch() I added "TransientRateType:PkgTranRateType.Selected,MonthlyRateType:PkgMonthRateType.Selected"  

and my patch works perfectly to insert into my history table.

 

Thanks again for your help,

Joe

 

Anonymous
Not applicable

Hi @jaylou,

 

To tell you the truth I usually avoid Choice columns or LookUp columns in SharePoint and build what I need inside the apps...I feel that The Choice columns have a little delay to show the options, or at least when I test them, so I stop using them.

 

Anyway, I am not sure about this but I think the dropdown fields on your form should have a property called DefaultSelectedItem. You should use that option instead of the Default property in your hidden form, I think that should do the trick.

Anonymous
Not applicable

Also...I wrote this a while ago to remember and share with others, it could be useful if you pull data from other controls to your hidden form, particularly 9, 10 and 11 are quite tricky.

 

1. From Text Input :

On the Default property of the data card add:

YourTextInput.Text

If wanted, you can use other formulas like concatenate to build text from several TextInput controls

  2. From Dropbox :

On the Default property of the data card add:

YourDropbox.Selected.Value

  3. From DatePicker :

On the DefaultDate property of the data card add:

YourDatePicker.SelectedDate

  4. From Rating:

On the DefaultDate property of the data card add:

YourDatePicker.SelectedDate

 

 

5. From Checkbox:

On the DefaultDate property of the data card add:

YourCheckBox.Value

In this case, it is usually better to use something like:

If(YourCheckBox.Value=true,"Add your text here","Add another text here")

 

6. From Radio:

On the Default property of the data card add:

YourRadio.Selected.Value

 

 

7. From Toggle:

On the DefaultDate property of the data card add:

YourToggle.Value

In this case, it is usually better to use something like:

If(YourToggle.Value=true,"Add your text here","Add another text here")

 

 

8. From Slider:

On the Default property of the data card add:

YourSlider.Value

 

 

9. From People Picker (from a People type column) :

To be able to use this option, I just add a Form with the Name data cards I want to use. I am not going to submit this form but it allows me to use the Name type column of SharePoint and its choices.

On the to be submitted, on the DefaultSelectedItems property of the data card add:

If(
    NameOfTheFormToSubmit.Mode = FormMode.New,
    {
        DisplayName: YourNamePickerDropbox.Selected.DisplayName,     
  
        JobTitle: YourNamePickerDropbox.JobTitle,
        Email: YourNamePickerDropbox.Email,
        Claims: YourNamePickerDropbox.Claims
    },
    Parent.Default)

YourNamePickerDropbox is from the form that is no going to be submitted

10. From Dropbox from a LookUp type column :

On the DefaultSelectedItems property add:

{
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id    : YourDropbox.Selected.ID,
    Value : YourDropbox.Selected.Title
}

 

11. From Listbox:

You can select one or several items from a list box and then collect them in one field of your form to submit (single or multi-line text). In order to do that, we collect the information from the list box in a temporary collection and then add it as a string in the form's field separated by ";".

On the OnSelect property of the List box add:

Collect(YourCollection,ListBox1.SelectedItems)  --- here you're creating your collection, so choose a meaningful name

On the OnChange property of the List box add:

Clear(YourCollection)

Finally, on the Default property of your form's field add:

Concat(YourCollection.Value, Value & " ; ")

 

12. From Selecting an item from a gallery

You can select items from a gallery and fulfil several fields on your form from it. Just add, on Default property of your form's fields the following formula: 

NameOfYourGallery.Selected.NameOfTheColumn

Thanks again @Anonymous!!

 

My issue was there are 2 defaults for a Drop Down Data card.

1) Data Card Itself

2) Data Card Value

 

I was adding the defaults to the Data card Value, once I saw the default on the card itself, all is good 🙂

Newbie mistake!!

 

Joe

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (4,022)