Input text field value out from the block


I have a web block with input value. Based on input value (in my example choices are "1", "3" and "99"). On "1" block shows a dropdown list of values, on "2" another list of values and on "99" one text input box. These values are exclusive. Choices "1" and "3" are handled in OnSelect action and in event that passes the values to mother (screen) level.

However, free field value is not passed. Obviously because there is no OnChange handler for that inside a block. If I set that OnChange handler then the handler will be triggered on every keypress and that I don't want.

These values are part of the form and there is a SAVE button on a form but not inside current block. I don't want to add extra button for passing input field value to screen level. 

I already tried so that values "1" and "3" would be inside a block and "99" outside, ie. set them inside an if statement in the screen. That caused "Minified error occured.." statement, an error message that I did not understand. I found one post in forum that stated that it is caused when a block is inside an if statement. That is why my next approach was like in this post. 

So is there a way to pass text field value from the block without a button? And not one character at the time but the whole text. Or another sensible solution.

Hi Jussi,

The best way might be to use the OnBlur event instead of OnChange, so the value would be passed only when the textbox loses focus (when user clicks some where else in the screen, that is). 

An alternative could be to increase the delay for OnChange, if that suits your needs.

I find this forum post quite helpful on that issue. 

Hi Ozan

Thank you for your reply! That timer increase might work. However I got another idea concerning this during the weekend. I put Account and Resource dropdowns in the block inside an IF statement so they are invisible if Input parameter = "99". The OnParametersChanged checks if it is "99" and if it is then it just goes away. I moved free text to screen level and it's visibility is handled with another boolean variable. This seems to work.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.