What – this is core functionality – why are you questioning this?
CLICK OR TAB TO CONTROL
Clicking a textbox will start the OnSelect action, but tabbing to same control (forward tabbing or back tabbing) does not start the OnSelect action .
So how do you instruct a user to only click. You can’t so we need to write custom code. The action OnFocus – is not currently available (has been requested in many blogs).
Question may be why is this action required on a textbox for example. It is not an action used often. I have come across the need for this only in a few cases for textboxes. The most common is to set a toggle indicating the OnChange should use.
CARE WHEN USING SELECT FUNCTION
Taken from Microsoft Docs https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-select
Select queues the target OnSelect for later processing, which may happen after the current formula has finished being evaluated. Select doesn’t cause the target OnSelect to evaluate immediately, nor does Select wait for OnSelect to finish being evaluated.
As a programmer we can interpret this as an asynchronous rather than synchronous function.
So you cannot depend on a variable being returned to your calling function.
Therefore I only use Select(<some button>) as the last statement in a function and chain multiple of these together.
Please be very careful, otherwise you may waste lots of time debugging.
I use this pattern to assist with code reuse. For example, if validations must be performed prior to leaving a screen as well as on a save, I do not want to repeat same code, so will have a hidden validate button and use Select(butValidate).
Recent Comments