Hi Teodor,
Like a number of discussions, things sometimes go off at a bit of a tangent - because many isues overlap and have common issues.
The original issue regarding setting the focus of a form field is relatively trivial. I had solved the problem anyway but it raised some general questions - which is why I started the thread. It lead to the rather more important issue of variables being set (or not) and the possibility of queries failing or returning incorrect results.
@psweb suggested actions run simultaneously rather than sequentially. George then said this was “indeed wrong”, and I was reassured. After more information from @psweb, George was less reassuring and suggested setting a value in the first action and then using it directly is “not that a good idea”. He suggested that @patrick might be able to give more insights into using setValue - which is why I was waiting for more clarification.
George saying:
… is not very encouraging.
Can I assume that setting a value and then using is unreliable generally, or only in certain circumstances? Frequently I’ll set a value with a button and that value will determine what parameters are sent to a query. I don’t want to have two buttons - one to set a value and another to run the server action (even then, would I know the variable was set?). Are there situations where this could be unreliable? Is there any way that I can determine if a value has been set? In PHP, it’s normal practice to test variables before taking further actions relying on those variables being set. I’ve used similar things in other languages. Does Wappler need something like this (or does it already have it)?
I’m sorry to go on about this, but it seems to more a very important issue and the explanations put forward so far don’t seem very clear.