Hello Lukasz,
Assuming the Control ID of your button is "Button1", you could set the visibility of the button in the Load function of the coach view that contains the button with these lines:
var button1 = this.ui.get("Button1");
button1.setVisible(false, true); //Hide
button1.setVisible(true); //Display

------------------------------
Bob Riaz
Business Automation Consultant
Salient Process
------------------------------
Original Message:
Sent: Tue January 24, 2023 12:53 PM
From: Łukasz Piotrowski
Subject: How to set visibility control on load event in view
Hi!
I have a simple view. Several fields to fill out and 3 buttons. How can I set the visibility of the button in the view, depending on the input to the screen?
I have to do it in the place marked in red (load), but i have no idea how i can get to a specific button. I tried using: this.context.element.getElementsByTagName("Button1") but it returns me some HTMLCollection object and I can't do anything with it.
Please help.
------------------------------
Łukasz Piotrowski
------------------------------