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 / Creating Multiple List...
Power Apps
Unanswered

Creating Multiple List Entries when Multiple Selection happens in a Multi Select Combo box

(0) ShareShare
ReportReport
Posted on by 1,362

Hello and good morning.
I have been banging my head against the wall trying to figure this out, without success.

I have a multiselect combo box having various Software program titles.

Fields are:
ProgramName (Multi Select)
MachineName (Single Line Text)
UserName (Person/Group)

What would like to do is update my SharePoint list "Software Users" with a separate record for each multi select choice that was made. Then update the "Software License" list that shows how many licenses are allocated for each title, the count of licenses used and the total remaining licenses. 

The scenario is: Person "A" is hired, and a PC is loaded with various software titles, each title allocated to the PC must be accounted for and the license count updated. It would be nice if the power app can show a label warning when zero licenses are available.
Any ideas would be helpful.
Thank you.

Categories:
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @golfnutt82 ,

     

    I suggest using "ForAll()".

     

    "ForAll()" process a batch of commands for each record in a table you provide. For example, for each selected items in your ComboBox, you could "Patch()" the corresponding item in your list.

     

    ForAll(
     ComboBox.SelectedItems,
     With(
     {
     _licence:LookUp('Software Licence', Title = ThisRecord.Title)
     },
     Patch(
     'Software Licence',
     _licence,
     {count:_licence.count-1}
     )
     )
    )

     

     

  • golfnutt82 Profile Picture
    1,362 on at
    ForAll(
     ComboBox.SelectedItems,
     With(
     {
     _licence:LookUp('Software Licence', Title = ThisRecord.Title)
     },
     Patch(
     'Software Licence',
     _licence,
     {count:_licence.count-1}
     )
     )
    )

    what is _License or _Licnese.count what does _license refer to?

     

  • WiZey Profile Picture
    3,023 Moderator on at

    It's part of the "With()" function.

     

    "With()" creates a local context in runtime where you can quickly define temporary variables that automatically expires at the end of the function.

     

    Here, I'm declaring a "_licence" variable that stores the corresponding record from "Software Licence" list so I don't have to use "LookUp()" twice in the "Patch()". Basically, it saves performance and eases readability. 

     

    "_licence" is the record from your list you want to patch.

    "_licence.count" is the licence's current count so you can decrement or increment it.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard