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

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.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (29,760)