Clear values from txt field script

I have an Alert pop page allowing a user to select tags and create an alert, this happens after selecting a Tag, Name, Location, setting alert type, etc… then clicking on a button to execute this. What script can I add to this button that will clear the values selected once the Alarm get created? (list and also text input fields as well as labels being passed from another window)?

Your script will simply set the property of each component to clear them out:event.source.parent.getComponent("Text Field").text = ""That will clear out a text field. You can do the same thing for other components but changing the property you want to clear out.

2 Likes

Ok cool that works except on the text boxes that are set to invisble when the button is clicked. How can I get those to clear out as well?

It should still work even if the text box is invisible. Do you have a script that makes it visible somewhere that is also setting the value of the text property or something along those lines?

and you can set the visible property if you want as well:event.source.parent.getComponent("Text Field").visible = 1