Just set the textbox to format number and Maximum lenght to 3
Thank you for the suggestion. I gave it a shot, but users are able to enter numbers from 101 to 999. I am hoping to cut them off at a specific number, such as 100 in my example.
In that case try to add in OnChage property of your TextInput
UpdateContext({restrict: Value(TextInput1.Text)}); If(restrict>100, UpdateContext({restrict: 100}))
And change Default property of the TextInput to
restrict
This will automaticaly change the value of that TextInput to 100 when user type value larger then 100. That is the only way you can do it
I don't know if you already solved this issue, but I had this exact situation and I prevented the user from submitting the form if they entered a number into the text box (called Ans211) that was higher than 100:
TL;DR: Use the Value and Text functions to extract the number that the user has entered (syntax: Value(Text(TextBox)) ) and use an If function to prevent the submit button from working unless the number is within your specified parameters. A pop-up warning is also easy and helpful to throw in there.
I had a similar problem. In my case, I had a Rich Text Editor box to which I wanted to add a character limit. Here's what I did.
Create a Rich Text Editor with the following properties:
BorderColor: If(Len(RichTextEditor.HtmlText)>1500, Color.Red, Color.Black)
Create a label with the following properties:
Text: "Label (" & 1500 - Len(RichTextEditor.HtmlText) & " character limit)"
Color: If(Len(RichTextEditor.HtmlText)>1500, Color.Red, Color.Black)
Create a button with the following properties:
On Select: If(Len(RichTextEditor.HtmlText)>1500, Notify("RichTextEditor exceeds 1500 character limit", NotificationType.Error), SubmitForm(Form))
There may be a more elegant way to achieve the same results, but this worked for me.
Hi
I had the same issue. trying to limit the values for seconds to maximum 59. I did this:
In Onchange -> If(CompleteMin/1>59, Reset(CompleteMin), false)
All values below 60 stays in the field but when I try higher the field resets.
Had to divide the "CompleteMin" field with 1 to convert it from control to value.
With best regards
Hafsteinn
Great.
In my case I am trying to do the UpdateContext only in one Gallery Item and them Patch to a sharepoint list, like bellow.
UpdateContext({restrict: Value(TextInput1.Text)});;
If(restrict>ThisItem.Extra_Forecast; UpdateContext({restrict:ThisItem.Extra_Forecast}));;
Patch(App_ExtraForecast; ThisItem;{Equalization_Seller:Value(TextInput1.Text)})
It happens that when I put the UpdateContext and If condition, also as the restrict in the Default function, when I change an Text Input, it changes in all gallery item.
How can I do this UpdateContext only in the selected item of the gallery?
User | Count |
---|---|
124 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
214 | |
181 | |
140 | |
96 | |
83 |