Skip to main content
November 4, 2021
Question

Button

  • November 4, 2021
  • 5 replies
  • 0 views

how can I get my button to return to the first screen, if I create a local variable with name 

local!currentStep: 1,

a!buttonArrayLayout(
buttons: {
a!buttonWidget(
label: "Atras",
size: "SMALL",
width: "FILL",
style: "NORMAL",
value: local!currentStep - 1,
saveInto: local!currentStep,
showWhen: or( local!currentStep = {1,3} )
)
},
align: "START"
)

    5 replies

    richardm900458
    November 5, 2021

    Hi aliciam,

    welcome in the community:

    1.) try to use the insert code function below yourt textfield. it makes it way easier to read code.

    a!buttonArrayLayout(
        buttons: {
            a!buttonWidget(
                label: "Atras",
                size: "SMALL",
                width: "FILL",
                style: "NORMAL",
                value: local!currentStep - 1,
                saveInto: local!currentStep,
                showWhen: or( local!currentStep = {1,3} )
            )
        },
        align: "START"
    )

    if the first screen is another form, you need to submit your current form and build a loop in your process.

    stewart.burchell
    November 5, 2021

    Note that if you use a!formLayout() - which comes with navigation buttons bundled into it - you can also use the 'Allow users to step back to this node from the next chained activity.' setting (on the 'Other' tab) on the User Interface nodes where Appian will automatically add a 'Go Back' navigation button for you.

    richardm900458
    November 5, 2021

    yes, i often forget about that function. valuable comment :)