cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Convert a String into a Num

I'm new into this.

I have the following formula on a Color property of a Label:

<If(Price.Text>= 1000, Red , Gray)>

<Price.Text> returns a String, so logically it doesn't evaluate.

Obvious questions is, how to convert that into a Number.

I tried <Price.Value> but i believe it doesn't work with labels.

 

Many thanks.

28 REPLIES 28

@Anonymous 

Change the Text property of the label to this code to achieve the result with € at the end

 

Price.Text & “€“

 

---
Please click "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."

Anonymous
Not applicable

Still nothing.

Can you give a screen shot, because the Text property is Different from the Color property

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Anonymous
Not applicable

Sure.

Anonymous
Not applicable

I manage to get one or the other. Either the color without the € or the other way around but not both.

@Anonymous 

If it’s inside a gallery can you try this code?

 

Text(ThisItem.Price) & “€”

 

---
Please click "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."

Anonymous
Not applicable

Shouldn't I be seeing a number here? I believe that the Value() is not returning anything.

use:

ThisItem.Price&" "&"€"

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Anonymous
Not applicable

Still nothing. The color is not showing.

@Anonymous 

Change the Color property of your label to this code:

 

If(ThisItem.Price>=1000, Red, Black)

 

---
Please click "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."

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (32,810)