@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
Hi @Anonymous
Do you mean you've posted mistake?
@Anonymous ,
Please make another post and I will close the thread with that.
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.
@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.
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
If I use a label instead of the Dropbox, it works.
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
Hi and Thx
Unfortunately, this does not work either...
I have it on Default and DefaultSelectedItems
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
Hi ..
{
Value: If(
Agent.Selected.Value = "Marco Becker",
"PMI"
)
}
this works for one Person ....
How do I get the other agents into this code?
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
194 | |
68 | |
48 | |
42 | |
20 |
User | Count |
---|---|
253 | |
122 | |
83 | |
76 | |
69 |