cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hhg222
Level: Powered On

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 Team
Community Support Team

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
PowerApps Staff CarlosFigueira
PowerApps Staff

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.

Super User
Super User

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

hhg222
Level: Powered On

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 Team
Community Support Team

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

hhg222
Level: Powered On

Re: Update field based on choice in SharePoint list

This is excellent thank you!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 130 members 5,369 guests
Recent signins:
Please welcome our newest community members: