cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hhg222
Regular Visitor

Update field based on choice in SharePoint list

Hi, I have a list with 10 choices (categories) in dropdown.  Based on the choice I would like to update the 'Assigned to' field to the person responsible for the category.  I would like the 'assigned to' field to not show on the form, just capture it for flow/email purposes.

 

Case:

If user selects Dog (category) assigned to = jane.doe@microsoft.com

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

The message means you are working with a lookup field (record type).

See this thread for more details.

Then the switch should be modified as below:

 Switch(Dropdown.Selected.Value,
 "dog", 
    {   Claims:"i:0#.f|membership|jane.doe@microsoft.com",
    Department:"",
   DisplayName:"Jane's User Name",
         Email:"jane.doe@microsoft.com",
      JobTitle:"",
       Picture:""},
"cat",
    {Claims:"i:0#.f|membership|someone.else@microsoft.com",
    Department:"",
   DisplayName:"someone's User Name",
         Email:"someone.else@microsoft.com",
      JobTitle:"",
       Picture:""}, 
  {Claims:"i:0#.f|membership|no-owner-default@microsoft.com",
  Department:"",
 DisplayName:"No-owner-default's User Name",
       Email:"no-owner-default@microsoft.com",
    JobTitle:"",
     Picture:""}
)

Regards,

Michael

Community Support Team _ Michael Shao
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

5 REPLIES 5
CarlosFigueira
Power Apps
Power Apps

You can update the card that is mapped to the 'Assigned To' field to have its 'Update' property reflect the logic that you want, and then hide it (so that the user can't change it). To do that, first you'll need to select the card and unlock it (in the Advanced view of the right-side pane), then set its Update property to something along the lines of:

Switch(
    DataCardValue11.Selected.Value,
    "Dog",
        "jane.doe@microsoft.com",
    "Cat",
        "john.roe@microsoft.com",
    "Mouse",
        "joan.poe@microsoft.com")

Where 'DataCardValue11' is the name of the dropdown control that has the categories. Once you have this ready, you can hide the card by setting its Visible property to false.

RusselThomas
Microsoft
Microsoft

Hi hhg222,

[Edit: Carlos too quick for me, but glad to see we think alike 🙂 Kudos to him]


Assuming you're assigning the person responsible for the dropdown category manually, you can add the Assigned field and edit the card properties (not the control inside the card, the card itself) as follows;

 

Update: property 

 Switch(Dropdown.Selected.Value, "dog", "jane.doe@microsoft.com", 
"cat","someone.else@microsoft.com", "no-owner-default@microsoft.com")

Visible: property

false

Hope this helps,

 

 

RT

This is exactly what I hope to accomplish - thanks for the help after many hours of googling!

 

When I change the update field I receive the following error "The property expects Record values, but this rule produces incompatible Text values"  

 

Any ideas?

The message means you are working with a lookup field (record type).

See this thread for more details.

Then the switch should be modified as below:

 Switch(Dropdown.Selected.Value,
 "dog", 
    {   Claims:"i:0#.f|membership|jane.doe@microsoft.com",
    Department:"",
   DisplayName:"Jane's User Name",
         Email:"jane.doe@microsoft.com",
      JobTitle:"",
       Picture:""},
"cat",
    {Claims:"i:0#.f|membership|someone.else@microsoft.com",
    Department:"",
   DisplayName:"someone's User Name",
         Email:"someone.else@microsoft.com",
      JobTitle:"",
       Picture:""}, 
  {Claims:"i:0#.f|membership|no-owner-default@microsoft.com",
  Department:"",
 DisplayName:"No-owner-default's User Name",
       Email:"no-owner-default@microsoft.com",
    JobTitle:"",
     Picture:""}
)

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is excellent thank you!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,901)