cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ez1138
Helper V
Helper V

Changing Display Value, Removing the ; and #

Pulling from a "choice" list, I'm seeing the value come through in my PowerApps as the following...

 

;#Choice 1;#Choice 2;#

 

Here's the code I'm using for the field...

 

First(Filter('Company-Agency', 'Company Name' = Body_Company.Text)).'Agencies Served - Calc'

 

This code is due to using multiple lists within the PowerApp.  It works perfect outside of choice fields.  I had to use the SharePoint workaround the be able to see the choice field as an option in PowerApp (workaround of creating a choice column as a single line text, another column as a calc to pull that choice column field (that was single line text), deleting that original choice then creating a real choice column with a multiples). 

 

The Choice 1 and Choice 2 are correct...I just need to remove those ; and #.  Ideally I would like the following....

 

Choice1, Choice 2

 

As a bonus, is there a way to display it as Choice 1 in line 1 and Choice 2 right below it?

 

Thanks for any insight!!!

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

@ez1138 

Could you show the data construct of the SharePoint list?

How did you define the 'Agencies Served - Calc' column?

While the source of the issue may be from SharePoint, try this as an alternative

 

Trim(Substitute( First(Filter('Company-Agency', 'Company Name' = Body_Company.Text)).'Agencies Served - Calc'  ,";#",Char(10)))

 

Snipaste_2020-02-03_14-04-38.png

Sik

 

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @ez1138 ,

If you are pulling from a "complex" field such as a choice field, you might try .Value instead of .Text

First(
   Filter(
      'Company-Agency', 
      'Company Name' = Body_Company.Value
   )
)
.'Agencies Served - Calc'

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

Thanks for the reply.  I tried that...no dice there.

v-siky-msft
Community Support
Community Support

@ez1138 

Could you show the data construct of the SharePoint list?

How did you define the 'Agencies Served - Calc' column?

While the source of the issue may be from SharePoint, try this as an alternative

 

Trim(Substitute( First(Filter('Company-Agency', 'Company Name' = Body_Company.Text)).'Agencies Served - Calc'  ,";#",Char(10)))

 

Snipaste_2020-02-03_14-04-38.png

Sik

 

Worked awesome.  Thanks!!!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

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.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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