cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Joaoleaga
Regular Visitor

Change Default Value of Text Input via OnSelect command

Hello, 

 

I need help building an 'OnSelect' command that changes the default value of a 'Text Input' field in my app.

 

Here is more background.  I have a 'Text Input' field (numberic) with a default value of "0" and maximum character lenght of 2.  See attachment.

 

Users are complaining that when trying to enter a new value,  the "0" default value apears in the screen and it requires to do a backspace before being able to enter the new value.  This is making it unfriendly for user to enter values.  

 

Is there an OnSelect command that I can add to the Text Input field that would change the default value to blank or ("") ? ???

 

Help!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi!

 

Just like this

 

dariobois_0-1603902233504.png

 

Then, use this formula when you want to put a value into textbox. In OnVisible property of that screen, for example.

 

UpdateContext ({varDefault: 123123123}) 

 

Replace "123123123" with a value you want or, take it from another textbox for example.

 

Regards!

 

View solution in original post

3 REPLIES 3
dariobois
Resolver II
Resolver II

Hi!

 

You can put a Context Variable on the Default property of the TexBox, then change its value from OnSelect property of another control.

 

Regards!

Hi Dariobois,

 

Thanks for your prompt response.  I like your suggestion.  But how don't know how to set the variable to the number 0.  I am only familiar with setting variables to true or false.

 

You mind taking a look at the sentence in the screen shot to see what I am doing wrong? (varDefault0 = Number:0) 

 

Hi!

 

Just like this

 

dariobois_0-1603902233504.png

 

Then, use this formula when you want to put a value into textbox. In OnVisible property of that screen, for example.

 

UpdateContext ({varDefault: 123123123}) 

 

Replace "123123123" with a value you want or, take it from another textbox for example.

 

Regards!

 

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (63,733)