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
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,902)