How does one code for pause/resume button in apps?

I'm looking for the groovy syntax that allows to generate a pause/resume button/function in a cust app. I looked in the forums but couldn't find it or maybe I wasn't using the proper keywords, I don't know. Thanks in advance.

input "name_of_button", "button", title: "Click This Button"

def appButtonHandler(btn) {
    switch(btn) {
        case "name_of_button":   //do some stuff
            break
    }
}

Clicking a button effectively causes a page submit, just like submitOnChange: true does.

1 Like