Forcing upper case letters in a datacard or text field entry
-
Forcing upper case letters in a datacard or text field entry
Posted by John Heck on January 23, 2023 at 4:38 pm-
Hello,
Trying to figure out how to force upper case letters in a datacard or text field entry. I have a couple of datacards that I want to have forced to upper case on a form. The user needs to be able to see the entries in all upper case before they submit the form. A SubmitForm() is used to submit the form and write the data to the Azure SQL back end.I have another screen that the user can enter information into text boxes and I use the Upper() function in the Patch() to force the entry to upper case. Though it would be nice to have the user be able to see the case of the data entry, all upper case, before they submit the form.
Thanks in advance for your assistance.
——————————
Kind regards,
John Heck
———————–
—————————— -
Without trying to verify this, you might want to use the Upper() fuction in the OnChange or even the OnSelelct prooperty of othe field in the datacard to show the user the changed value.
OTOH, I am often surprised at how something seemingly obvious iin approach fails in practice
——————————
Larry Heimendinger
larry@techevents.com
EverettWA
——————————
——————————————- -
Ed Bellman
MemberJanuary 25, 2023 at 11:17 AM
This isn’t a perfect or elegant solution [EDIT – see Warren’s below], but it works –Insert a Label (Label11 in screenshots) and Text Input field (TextInput1). Arrange them so that the X,Y values are the same in the canvas and in the Tree view on the left, make sure the Text Input field is above the Label so that it will receive the focus from the tab or mouse selection.
Set the following properties:
- TextInput1
- Color – transparent (use the picker or just set the A value of RGBA to 0)
- Fill Color – transparent
- Hover Color – transparent
- Hover Fill – transparent
- Maybe Pressed and Focus colors as well?
- Label11
- Text = Upper(TextInput1.Text)
- X = TextInput1.X
- Y = TextInput1.Y
- Width = TextInput1.Width
Test in play mode
——————————
Ed Bellman
Principal Consultant – Power Apps
——————————
——————————————- - TextInput1
-
Warren Belz
MemberJanuary 26, 2023 at 1:54 AM
Hi ,
If it is OK for them to see lower case while entering, but have it switch and save to upper case, then ?OnChange of the Text BoxUpdateContext({varUpper: Upper(Self.Text)}); Reset(Self)?
Default (assuming you want to also display existing values if they are present and not change them)
Coalesce(varUpper, Parent.Default)
DelayOutput
true
OnSuccess of Form and screen OnVisible
UpdateContext({varUpper: Blank()})
?See below
——————————
Warren Belz
MVP (Business Applications)
Australia
——————————
——————————————- -
Hello , thanks for the solution. It works great. Sorry it took me so long to test it and get back with you. Really appreciate the help.?
——————————
John Heck
——————————
——————————————- -
Hello @Ed Bellman, your solution worked as well though the users didn’t like not being able to see the cursor to know which field they were in. I do appreciate the assistance with this.?
——————————
John Heck
——————————
——————————————- -
Hello , I cannot get the Upper() function to work that way. This was one of the first things I tried.
Thanks for the suggestion. I do wish it was that simple or at least have a switch to force upper case would be nice.?
——————————
John Heck
——————————
——————————————- -
Warren Belz
MemberFebruary 7, 2023 at 1:35 AM
Disregard . . .
——————————————- -
Dean Morgan
MemberFebruary 7, 2023 at 9:05 AM
I tried the following and it seemed to work;Set the Text input field OnChange to:
Set(vtext,Upper(TextInput1.Text))Then set the default of the TextInput1 textbox to vtext
Finally, set DelayOutput trueThat allows me to type into the text field and it only changes to upper after a delay.
——————————
Dean Morgan
Azure Architect
Irmo
——————————
——————————————- -
Hello , thank you for your input. gave the same solution just a few more steps that made it work exactly as I wanted it to. Though it would be so nice to have Microsoft to add a switch on the data card field that would force upper case.
——————————
John Heck
——————————
——————————————-
John Heck replied 1 year, 3 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘Forcing upper case letters in a datacard or text field entry’ is closed to new replies.