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