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

Formatting Text

i'm having currency field which is having value 1000.89, now how can I format the text label or html text to show value in the following format. 

 

1.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Krishna98 

You can try this:

"<sup>$</sup><b>" & 
RoundDown(1000.89, 0) & 
".</b><sup>" & Mod(1000.89, 1)*100 & 
"</sup>"

 You would replace the hard coded 1000.89 values the your list item value.

View solution in original post

5 REPLIES 5
timl
Super User III
Super User III

Hi @Krishna98 

Some variation of this should work for you.

"<sup>$</sup><b>1000.</b><sup>89</sup>"

timl_0-1602510638998.png

 

hi @timl ,

 

since i'm getting the value from list, how can split the remaining value after the dot

Hi @Krishna98 

You can try this:

"<sup>$</sup><b>" & 
RoundDown(1000.89, 0) & 
".</b><sup>" & Mod(1000.89, 1)*100 & 
"</sup>"

 You would replace the hard coded 1000.89 values the your list item value.

View solution in original post

HI @timl 

 

Thank you, it's working super fine. can you please explain how this works

 

Hi @Krishna98 

  • The HTML sup tag defines superscript text
  • The RoundDown function rounds down to the nearest whole number. We call this rather than the round function because in this example, rounding 1000.89 would return 1001.
  • The Mod function returns the remainder when we divide a number by divisor. We multiply the result of this by 100 to give the whole number (in this example, 89).

Does that help?

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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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