cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dcayanan
Microsoft
Microsoft

Input Data from List Box put into an excel sheet

I have a List Box with a bunch of item in it. I would like to be able too have people select one of the item and hit submit and the item they selected will be put into the excel sheet.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @dcayanan ,

Do you want to patch selected item within your List Box into your Excel table?

 

Based on the needs that you mentioned, I think the Patch function could achieve your needs. Please take a try with the following workaround:3.JPG

Set the OnSelect property of the "Patch to Excel" button to following:

Patch(Table1, Defaults(Table1),{EmployeeName: ListBox1.Selected.Title})

You may type the following formula:

Patch(
YourExcelTable,
Defaults(YourExcelTable),
{
ExcelColumn1: ListBox1.Selected.Column1,
ExcelColumn2: ListBox1.Selected.Column2,
ExcelColumn3: ListBox1.Selected.Column3,
...
}
)

In addition, if you select multiple items in your List Box, and then want to patch multiple items into your Excel table at the same time, please take a try with the following workaround:

Set the OnSelect property of the "Patch to Excel" button to following:

ForAll(
ListBox1.SelectedItems,
Patch(
YourExcelTable,
Defaults(YourExcelTable),
{
ExcelColumn1: Column1,
ExcelColumn2: Column2,
ExcelColumn3: Column3,
...
}
)
)

Please take a try with above solution, check if the issue is solved.

 

More details about the Patch function and ForAll function, please check the following article:

Patch function

ForAll function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
RezaDorrani
Dual Super User II
Dual Super User II

Hi @dcayanan 

 

For the list box control set property SelectMultiple to false (since you want user to only select 1 value)

 

In order to get the data from the list box

Use listBox.Selected.Value

where listBox is the name of your list box control

 

Watch this video for PowerApps and excel connector 

https://www.youtube.com/watch?v=-Z_13J02RPU

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

v-xida-msft
Community Support
Community Support

Hi @dcayanan ,

Do you want to patch selected item within your List Box into your Excel table?

 

Based on the needs that you mentioned, I think the Patch function could achieve your needs. Please take a try with the following workaround:3.JPG

Set the OnSelect property of the "Patch to Excel" button to following:

Patch(Table1, Defaults(Table1),{EmployeeName: ListBox1.Selected.Title})

You may type the following formula:

Patch(
YourExcelTable,
Defaults(YourExcelTable),
{
ExcelColumn1: ListBox1.Selected.Column1,
ExcelColumn2: ListBox1.Selected.Column2,
ExcelColumn3: ListBox1.Selected.Column3,
...
}
)

In addition, if you select multiple items in your List Box, and then want to patch multiple items into your Excel table at the same time, please take a try with the following workaround:

Set the OnSelect property of the "Patch to Excel" button to following:

ForAll(
ListBox1.SelectedItems,
Patch(
YourExcelTable,
Defaults(YourExcelTable),
{
ExcelColumn1: Column1,
ExcelColumn2: Column2,
ExcelColumn3: Column3,
...
}
)
)

Please take a try with above solution, check if the issue is solved.

 

More details about the Patch function and ForAll function, please check the following article:

Patch function

ForAll function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,069)