cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MindfulMike
Helper II
Helper II

Formatting currency/percentage not working on Form Edit Mode after amount is changed. Help!

I have an app with a Profit Margin field. 

 

The On Change is below and formats correctly when someone is submitting a new form:

 

Set(

varMargin,DataCardValueMargin.Text*1.00&"%")

 

Now there is a gallery of past submissions at the start of the app. If someone wanted to look at or change a submission they click on the gallery item and it turns the form to Edit mode and pre-populates the app with the info. 

 

The Default value for my Margin Field is below and also works. 

 

If(
'MarginForm'.Mode = FormMode.Edit,
(Text(Parent.Default)*100.00&"%"),
varMargin
)

 

My issue starts here. If a person brings in a previous submission it comes in as a % but when they go to change it, it does not automatically switch to %. How do I manipulate my formula to make that happen?

 

Thanks in advanced!! 😉

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @MindfulMike ,

I will make a suggestion here (which I use) as you have a curious mixture of numbers and text value and need Power Apps to understand what it is dealing with each time. I simply put a label with % at the right of the input box in the same font and size as the value (which is right-aligned), then deal with the value as text.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

@WarrenBelz 

Thank you for the reply, another issue came up so I will be looking at this again, hopefully by the end of the week. Thank you for your reply. I am praying it will help. 

Hi @WarrenBelz  

 

I definitely will be taking your advice in the future and put a label next to my text input. However, time constraints are preventing me from re-doing two forms full of these fields.

 

I will try to find a work-around and get back to you if anything works!

 

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 (2,809)