BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  How to set visibility control on load event in view

    Posted Tue January 24, 2023 12:54 PM
      |   view attached
    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
    ------------------------------


  • 2.  RE: How to set visibility control on load event in view

    Posted Wed January 25, 2023 09:54 AM
    Hello,
    You could also consider doing this in the On load event for each button. That way you would know that you have easy addressability to the context information for that button.

    Stuart Joens

    ------------------------------
    Stuart Jones
    Business Automation Technical Specialist
    IBM
    Cedar Rapids IA
    630 390 4436
    ------------------------------



  • 3.  RE: How to set visibility control on load event in view

    Posted Wed January 25, 2023 10:20 AM
    Edited by Bob Riaz Wed January 25, 2023 10:23 AM
    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
    ------------------------------



  • 4.  RE: How to set visibility control on load event in view

    Posted Wed January 25, 2023 10:22 AM
    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

    Cheers,
    Bob

    ------------------------------
    Bob Riaz
    ------------------------------