Hi,
I have a few simple fields for display only, and one of them is for a quantity. When the user clicks an Edit button, I want allow the user to update the items, and to position the cursor on the quantity field (this I know how to do), but WITH THE TEXT IN THE FIELD SELECTED, so that when the user types, the quantity is immediately replaced with the new value. The solution I have now requires the user to first delete the quantity before starting to type.
Using SetFocus(txtQuantity) places the cursor behind the quantity value:
This is what I want:
I tried the Select command, but it does nothing for a text box.
Thanks for any pointers,
Stephane
Solved! Go to Solution.
Hi@bouillons,
Based on the issue that you mentioned, do you want to direct entry in the TextInput on selecting the button?
Currently, make Text selected and entry to replacing the previous entries cannot be achieved in PowerApps. As an alternative solution, you can try the following workaround.
I have a test on my side, please take a try as below.
1/ Add a TextInput
2/ Add a Button and set the OnSelect property as below.
If(
!IsBlank(TextInput1),
Reset(TextInput1)&&
SetFocus(TextInput1)
)
Best Regards,
Qi
Put this code in the Default property of the control. When you change it to edit mode it will become blank.
If(TextInput_Aantal.DisplayMode=DisplayMode.Edit, Blank(), ThisItem.your_column_name)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi@bouillons,
Based on the issue that you mentioned, do you want to direct entry in the TextInput on selecting the button?
Currently, make Text selected and entry to replacing the previous entries cannot be achieved in PowerApps. As an alternative solution, you can try the following workaround.
I have a test on my side, please take a try as below.
1/ Add a TextInput
2/ Add a Button and set the OnSelect property as below.
If(
!IsBlank(TextInput1),
Reset(TextInput1)&&
SetFocus(TextInput1)
)
Best Regards,
Qi
Thanks Qi for your time and effort, that's a good enough workaround for my scenario for the time being.
Stephane