cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

mistake

Sorry Close 

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous ,

You are back to Switch

{
   Value:
   Switch(
      Agent.Selected.Value,
      "Marco Becker",
      "PMI",
      "James Bond",
      "007",
      "Maxwell Smart",
      "86",
      ThisItem.Team
   )
}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

10 REPLIES 10
Ramole
Super User
Super User

Hi @Anonymous 

 

Do you mean you've posted mistake?

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.
WarrenBelz
Super User
Super User

@Anonymous ,

Please make another post and I will close the thread with that.

Anonymous
Not applicable

I may need help after all .... I would like to make an automatic assignment in my shift plan

As follows: when I select an agent, the team and group should be automatically assigned.

Unfortunately I can't get it to work with the switch function .... I think because they are combo/dropboxes is that right? with a label it works without problems.

Macbek_0-1636262457461.png

 

@Anonymous ,

Please supply the code you are using (in Text), where you are using it and a bit more of a description on what you are trying to do.

Anonymous
Not applicable

hi and many thanks already @WarrenBelz 

I have 3 simple selection columns in a sharepoint list. Team, Group and Agent
i want when i select the agent the group and then the team to be adjusted as well

 

first i set it with the switch to the default of the team column but unfortunately it doesn't take this over

Macbek_0-1636266504963.png

If I use a label instead of the Dropbox, it works.

Macbek_0-1636267315260.png

However, I would like to see the drop or Combobox.

@Anonymous ,

That is not the way to use a Switch statement - you need an outcome for each option. They both need If instead of Switch - the first one

If(
   Agent.Selected.Value = "Marco Becker",
   "PMI",
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Anonymous
Not applicable

Hi and Thx

Unfortunately, this does not work either...

I have it on Default and DefaultSelectedItems

Macbek_0-1636276421911.png

 

 

the code should contain approx. 150 agents or more .... I think I am getting nowhere with If, or ?

@Anonymous ,

That is a Combo Box (not a Drop-down) your DefaultSelectedItems should be in the format

{
   Value:
   If(
      Agent.Selected.Value = "Marco Becker",
      "PMI",
      ThisItem.Team
   )
}

Also can you please post your code as Text (as well as the image)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

 

Anonymous
Not applicable

Hi ..

 

{
Value: If(
Agent.Selected.Value = "Marco Becker",
"PMI"
)

this works for one Person ....

 

How do I get the other agents into this code?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,112)