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

Store value in ListBox to multiple row in Sharepoint List

Here I have to submit and store value in ListBox to multiple line in SharePoint. I found a code in this post Save multiple items from a combobox in to excelfile with Powerapps.

And here is my code

 

 

 

ForAll(
    Split(
        Concat(ListBox1.SelectedItems,EmployeeCode,","),",");
        Collect(boxCol,Result);
Patch(ProjAs,DS(ProjAs),
    {ProjectName:Dropdown2.Selected.ContractProject,
    EmployeeCode:Result,
    StartDate:DatePicker1.SelectedDate,
    EndDate:DatePicker1_1.StectedDate}
)
);

 

 

 

Can you figure out where did I wrong.

Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions

When I was trying with Collect it was giving me error in ForAll function, you can use Collect like this - 

ForAll(
    Split(
        Concat(ListBox1.SelectedItems,EmployeeCode,","),","),
        Collect(boxCol,Result));

After Collect use the below formula - 

ForAll(
    Split(
        Concat(ListBox1.SelectedItems,EmployeeCode,","),","),
Patch(ProjAs,DS(ProjAs),
    {ProjectName:Dropdown2.Selected.ContractProject,
    EmployeeCode:Result,
    StartDate:DatePicker1.SelectedDate,
    EndDate:DatePicker1_1.StectedDate}
)
);

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

4 REPLIES 4
NandiniBhagya20
Solution Sage
Solution Sage

Please try using below formula :

ForAll(
    Split(
        Concat(ListBox1.SelectedItems,EmployeeCode,","),","),
Patch(ProjAs,DS(ProjAs),
    {ProjectName:Dropdown2.Selected.ContractProject,
    EmployeeCode:Result,
    StartDate:DatePicker1.SelectedDate,
    EndDate:DatePicker1_1.StectedDate}
)
);

 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Can you explain why need to remove the Collect(), I think we need for the get store temp data from ListBox. Then use it as "Result" below.

Thank you for your reply

When I was trying with Collect it was giving me error in ForAll function, you can use Collect like this - 

ForAll(
    Split(
        Concat(ListBox1.SelectedItems,EmployeeCode,","),","),
        Collect(boxCol,Result));

After Collect use the below formula - 

ForAll(
    Split(
        Concat(ListBox1.SelectedItems,EmployeeCode,","),","),
Patch(ProjAs,DS(ProjAs),
    {ProjectName:Dropdown2.Selected.ContractProject,
    EmployeeCode:Result,
    StartDate:DatePicker1.SelectedDate,
    EndDate:DatePicker1_1.StectedDate}
)
);

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Thank you its work for me now

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (3,617)