cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

text input onchange changing visibility

I want an inputted number field to show in currency format.

The only way I can think of to do that is the let them put in the number, then make the field disappear and in its place show a label or button with the value altered to currency format in its place.  In has to disappear only when the user inputs the whole number, so putting the formula in visible property does not work.  I would make the label or button look like the input field so hopefully they wouldn't even know.  Then, if they want to change the number, they click on that button and the text field shows again (basically changing the visibility of the button).  But I cannot seem to change the visibility in the OnChange property of the field.  Help!

Here is what I have: in the OnChange property for the input field that does not seem to work.  I cannot get the input field to disappear.   

 

If(IsBlank(DataCardValue14.Text),DataCardValue14.Visible = true,DataCardValue14.Visible = false)

1 ACCEPTED SOLUTION

Accepted Solutions

Nevermind.  I figured it out.  I did the following:

1. Created a variable in OnChange.  If not populated = 0 if populated, 1.

2. I then added the button, formatted it to look exactly like the input and made it visible with the variable was 1, so it hid the input exactly.  I made its text the number in currency format (though I still can't get commas in it).  

3.  The button disappears if the user clicks on it, thinking they are clicking on the input to change it. They end up changing it in the input and when they focus somewhere else, the button comes back, showing the currency version again.  

Pretty proud of that solution.  Kinda ridiculous work around, but it works.

View solution in original post

1 REPLY 1

Nevermind.  I figured it out.  I did the following:

1. Created a variable in OnChange.  If not populated = 0 if populated, 1.

2. I then added the button, formatted it to look exactly like the input and made it visible with the variable was 1, so it hid the input exactly.  I made its text the number in currency format (though I still can't get commas in it).  

3.  The button disappears if the user clicks on it, thinking they are clicking on the input to change it. They end up changing it in the input and when they focus somewhere else, the button comes back, showing the currency version again.  

Pretty proud of that solution.  Kinda ridiculous work around, but it works.

Helpful resources

Announcements
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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,039)