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
  • i agree with answer of robert and joubin. You can even use below approach also:
    load(
    local!orderSubmissionDate:today(),
    a!formLayout(
    label: "Form",
    contents: {
    a!dateField(
    label: "Date",
    labelPosition: "ABOVE",
    value: local!orderSubmissionDate,
    saveInto: local!orderSubmissionDate,
    validations: {}
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidget(
    label: "Submit",
    saveInto:{
    a!save(ri!theDate,local!orderSubmissionDate)
    },
    submit: true,
    style: "PRIMARY"
    )
    },
    secondaryButtons: {}
    )
    )
    )
Reply
  • i agree with answer of robert and joubin. You can even use below approach also:
    load(
    local!orderSubmissionDate:today(),
    a!formLayout(
    label: "Form",
    contents: {
    a!dateField(
    label: "Date",
    labelPosition: "ABOVE",
    value: local!orderSubmissionDate,
    saveInto: local!orderSubmissionDate,
    validations: {}
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidget(
    label: "Submit",
    saveInto:{
    a!save(ri!theDate,local!orderSubmissionDate)
    },
    submit: true,
    style: "PRIMARY"
    )
    },
    secondaryButtons: {}
    )
    )
    )
Children
No Data