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.

View solution in original post

This is excellent thank you!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,759)