web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Saving ListBox values ...
Power Apps
Answered

Saving ListBox values to individual columns in SQL

(0) ShareShare
ReportReport
Posted on by 78

I have a SQL table: RMA2

There are 5 columns in my SQL database: AwPartDetail1, AwPartDetail2, AwPartDetail3, AwPartDetail4, AwPartDetail5

 

Using a ListBox, "ListBox2" to select multiple values, anywhere from 1 to 5 selections (it is random each time) from a Common Data Service table "Inventories".

 

I want these values to save to the individual columns AwPartDetail1, AwPartDetail2, AwPartDetail3, AwPartDetail4, AwPartDetail5.

 

Having tried the ClearCollect and Patch functions I am at a lost as I can't seem to get the syntax right.....HELP!!!!

 

Simon

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @SumoTechSimon 

    I know that this doesn't answer your question about the list box but I would have approached the problem in a different way.  I would have put 5 comboboxes with Items property for parts and would patch them to a table individually.  When I was satisfied that the order was complete.  I would reset comboboxes.  In the example below, I used an excel table to store the data.  I used a variable called "seed" to find the last order ID and increment it by one. The first Combobox writes the new row by using the Defaults() element and assigns the ID number.  The subsequent comboboxes use that ID to fill the rest of the fields. _5.png 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard