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 / How do I update a Data...
Power Apps
Answered

How do I update a Dataverse Table with a multi select combo box

(0) ShareShare
ReportReport
Posted on by 49

I am learning Power Apps. Many years ago I programmed in VB 6. A lot has changed since then.

I am building a expense report that requires the user to select all the individuals in the carpool. Carpool is a multi select drop down box. I know that .SelectedItems gives me a table of the carpool members the user selected. I don't know how to access the individual members of the table.

 

The database table that contains the carpool members has a row for each member of the carpool and the reimbursement number.

 

This is the code I have:

ForAll(
Carpool.SelectedItems
Patch(
Carpools,
{
'Reimb Numb':First(colStageMinReimb).ReimbNumber,
'Sem Name':   This is where I need help. As the function iterates through the selected items, what parameter do I pass?
}
)

)

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Lukewarm ,

    You can also see a related post here: Community Link

     

    Hope this helps

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Lukewarm,

    Do you want to patch multi select Choice column in your Dataverse table?

     

    If it is a normal multi-select-Choice column and you set the ComboBox with Choices() function, you could directly use the following formula:

    Patch(
    Carpools,
    {
    'Reimb Numb':First(colStageMinReimb).ReimbNumber,
    'Sem Name': Carpool.SelectedItems
    }
    )

     

    Or you could hard-code the selectedItems as below:

    Patch(
    Carpools,
    {
    'Reimb Numb':First(colStageMinReimb).ReimbNumber,
    'Sem Name': Table({Value: Choice1list.A},{Value: Choice1list.B})
    }
    )​

     

  • Lukewarm Profile Picture
    49 on at

    Thank you for replying to my question. Here is an example of what I'm after. Let's say I have six people

    Bob, Lynn, Joe, Barb, Jackie and Rob. They travel together on a regular basis. They are reimbursed for mileage. For each of them, I need to track the dates and locations they traveled to regardless if they submitted an expense report. If Bob, Joe and Lynn traveled together, I want the entries in the carpools table to be:

     

    Reimb Numb  Sem Name

    10001              Bob

    10001              Joe

    10001              Lynn

     

    If the next trip Lynn, Barb and Rob traveled together, I want the entries in the carpools table to be:

     

    Reimb Numb  Sem Name

    10001              Bob

    10001              Joe

    10001              Lynn

    10002              Lynn

    10002              Barb

    10002              Rob

     

    The problem is 'Sem Name' is defined as a text field in the database. In the first solution you offered, I get an error since it is populating a value that is defined as a table into a text field. 

     

    Again, I appreciate your help. 

     

     

  • Verified answer
    Lukewarm Profile Picture
    49 on at

    I figured it out. I needed to use the ThisRecord followed by the field name used to populate the combo box. I thank you both for replying to my question. Y'all provide a valuable service.

     

    Lukewarm_0-1684186247014.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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard