cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

how to validate a form with several selected items in combobox

hi,

 

I have a form with a combobox "identity" in which I would like to make several selection and sent it to my Sharepoint list.

 

ex:in my comboxo I select:
titi toto tata


then in another combobox I select the activity:
running

 

I would like in the sharepoint list the recordings are like this:
toto - running
tata - running
titi - running

 

I put SelectMultiple = true
but when I validate the form and look in my Sharepoint liste I have only one registered info.

Can you help me ?

Thank you

2 REPLIES 2
Highlighted
Super User
Super User

Re: how to validate a form with several selected items in combobox

If you are expecting titi, toto and tata to each be a new item in SharePoint then you will need to use Patch() instead of SubmitForm(). With the Patch() method you will need to loop through (ForAll()) the selected values in the identity combo box and Patch them to SharePoint.

 

Example:

ForAll(ComboBox1Name.SelectedItems.Value, Patch('SPListName', Defaults('SPListName'), {IDD:Value , Activity:ComboBox1Name.Slected.Value})

 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Helper II
Helper II

Re: how to validate a form with several selected items in combobox

hello I come back to you because I can not validate several ID during an entry. here is the code that I put in the onSelect of the icon to validate:

 

ForAll(DataCardValue3.SelectedItems.Value;

Patch(DataList_SH ; Defaults(DataList_SH);{

identifiant:Value;

DateIntervention : DataCardValue27.SelectedDate;

Activite : DataCardValue33.Selected.Value

})

 

 

in my sharepoint list I have the columns:

DateIntervention

Activity

identifiant

 

before I use submit (Form1) in the onSelect of the icon, to validate.

 

thanks a lot for your help.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,192)