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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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