cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
freshyshreya
Post Patron
Post Patron

how to fix the error for switch function

Hi,

In the pic below,I am trying to use switch function(2) based upon the selection made in (1)

freshyshreya_0-1631515755397.png

Note:1 is a combo-box

2 is a label

The below pic shows the error

freshyshreya_1-1631515891825.png

Please help!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @freshyshreya ,

 

If you want to print the values in text format you can use below formula and update according to your requirement. 

 

Switch(ComboBox2.Selected.Value,"Finance",Concatenate("[","freshy","]"),.....)

 

 

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.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

7 REPLIES 7
PG_WorXz10
Community Champion
Community Champion

Hi @freshyshreya ,

 

Could you please share the code. It seems there is something wrong in the code and it is returning table values to the label.

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10 ,

Sharing the code in the pic below.

freshyshreya_0-1631517538730.png

 

Hi @freshyshreya ,

 

Do you want to display the text in square brackets ? 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @freshyshreya ,

 

If you want to print the values in text format you can use below formula and update according to your requirement. 

 

Switch(ComboBox2.Selected.Value,"Finance",Concatenate("[","freshy","]"),.....)

 

 

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.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10 ,

No,I don't want to display the text in square brackets.It should be normal text like freshy,rajesh,aravind etc

Hi @freshyshreya ,

 

In that case please try below formula because powerapps consider [ ] for array thats why it is resulting in records value. 

 

Switch(ComboBox2.Selected.Value,"Finance","freshy",.....)

 

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.

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10 ,

The solution works.Thanks!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,512)