cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KevinHardy
Resolver I
Resolver I

Formula question when displaying decimal points

I have seen previous questions and answers on the forum about this subject but not about an issue I have come across.

 

Text((ThisItem).Spent,"[$-en-US]£0.00") - This works and displays as £1.20 (This is part of a Browse Gallery)

Text((Parent).Default),"[$-en-US]£0.00") - This doesn't work and displays as 1.2 (This is part of the corresponding DataCard)

 

Any ideas why? Does the Text function not work with Parent.Default?

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@KevinHardy 

Can you please try something for me?  What happens when you change this formula...

 

Text(Parent.Default,"[$-en-US]£0.00")

 

Into this...

 

Text(Value(Parent.Default),"[$-en-US]£0.00")

 

I suspect the result will be £1.20.  If this is the case, your gallery is containing a number data type and your form is referencing a text data type inside of a text input control.  Check the property Parent.Default is referencing.  It will probably look like 

 

DataCardValue.Text

 

Text inputs always return a text value when referencing the Text property.  That's why we must convert them with the VALUE function.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@KevinHardy 

Can you please try something for me?  What happens when you change this formula...

 

Text(Parent.Default,"[$-en-US]£0.00")

 

Into this...

 

Text(Value(Parent.Default),"[$-en-US]£0.00")

 

I suspect the result will be £1.20.  If this is the case, your gallery is containing a number data type and your form is referencing a text data type inside of a text input control.  Check the property Parent.Default is referencing.  It will probably look like 

 

DataCardValue.Text

 

Text inputs always return a text value when referencing the Text property.  That's why we must convert them with the VALUE function.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

@mdevaney 

 

Fantastic. Thankyou 🙂  Makes sense now

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,361)