cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Update field based on choice in SharePoint list

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
Highlighted
Power Apps
Power Apps

Re: Update field based on choice in SharePoint list

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.

Highlighted
Microsoft
Microsoft

Re: Update field based on choice in SharePoint list

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

Highlighted
Regular Visitor

Re: Update field based on choice in SharePoint list

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?

Highlighted
Community Support
Community Support

Re: Update field based on choice in SharePoint list

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

Highlighted
Regular Visitor

Re: Update field based on choice in SharePoint list

This is excellent thank you!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,992)