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
Dual Super User

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 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,029)