How to bring today"s date to the process variables?

  a!dateField(
label: "Order Submission Date",
/*value: ri!OrderSubmissionDate,*/
value: fn!today(),
saveInto: ri!OrderSubmissionDate,
required: true
),

  Discussion posts and replies are publicly visible

Parents
  • You can mange this using saveInto on the submit button.

    a!formLayout(
      label: "Form",
      contents: {
        a!dateField(
          label: "Date",
          labelPosition: "ABOVE",
          value: ri!theDate,
          saveInto: ri!theDate,
          validations: {}
        )
      },
      buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidget(
            label: "Submit",
            saveInto:{
              a!save(ri!theDate,if(isNull(ri!theDate),fn!today(), ri!theDate))
            },
            submit: true,
            style: "PRIMARY"
          )
        },
        secondaryButtons: {}
      )
    )

Reply
  • You can mange this using saveInto on the submit button.

    a!formLayout(
      label: "Form",
      contents: {
        a!dateField(
          label: "Date",
          labelPosition: "ABOVE",
          value: ri!theDate,
          saveInto: ri!theDate,
          validations: {}
        )
      },
      buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidget(
            label: "Submit",
            saveInto:{
              a!save(ri!theDate,if(isNull(ri!theDate),fn!today(), ri!theDate))
            },
            submit: true,
            style: "PRIMARY"
          )
        },
        secondaryButtons: {}
      )
    )

Children
No Data