new save button on user input form

Hi, any one can help me on i want to add new save button apart from save draft option, disabling this auto save draft function keep a new save button until i submit form that user input form data must be draft into the form

  Discussion posts and replies are publicly visible

Parents Reply
  • insted of text i have given boolen false

    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidget(
    label: "Submit",
    submit: true,
    style: "PRIMARY"
    )
    },
    secondaryButtons: {
    a!buttonWidget(
    label: "save",
    confirmbuttonlabel: "data saved",
    cancelbuttonlabel: "data saved",
    value: false(),
    saveinto: ri!Param1,
    submit: false(),
    style: "SECONDARY",
    validate: false
    )
    }

    but result is 

    An Error Has Occurred

    Expression evaluation error [evaluation ID = CR1I1MIU] in rule 'lv_employeeinputs' at function a!buttonWidget [line 68]: An error occurred while executing a save: Could not cast from Boolean to LV_levCDT. Details: CastInvalid

Children
  • Your ri!param1 seems to be a cdt. You can't save boolean value in a cdt. Try something like this:

    a!buttonWidget(
    label: "save",
    confirmbuttonlabel: "data saved",
    cancelbuttonlabel: "data saved",
    value: false(),
    saveinto: {ri!isSave,
    a!save(ri!Param1.status, "Draft")
    },
    submit: false(),
    style: "SECONDARY",
    validate: false
    )

    ri!isSave is optional depending if you want to use that variable somewhere else. Also, if you are saving a boolean value in a variable, try to name that variable that starts with "is".