How to store the value in rule input if value and saveInto are not having same values.

I want to store the value of 'Monitoring Day' text field into rule input. Please find the below code I am using:

a!textField(
label: "Monitoring Day",
labelPosition: "ABOVE",
value: text(ri!monitoringDate,"dddd"),
saveInto: a!save(ri!monitoringDetails.monitoringDay,save!value),
showWhen: not(isnull(ri!monitoringDate)),
required: false,
readOnly: true,
validations: {}
),

It is not storing value in ri!MonitoringDay.

  Discussion posts and replies are publicly visible

Parents
  • To add to Mike's notes, a typical solution for updating a value which is not interacted with on the form is by utilizing the saveInto parameter of your Submit button - or another button that is sure to have user interaction (necessary for updating values).

    /* Submit Button*/
    saveInto:{
      a!save(
        ri!monitoringDetails.monitoringDay,
        if(
          fn!isnull(ri!monitoringDate),
          null,
          text(ri!monitoringDate,"dddd")
        )
      )
    }

Reply
  • To add to Mike's notes, a typical solution for updating a value which is not interacted with on the form is by utilizing the saveInto parameter of your Submit button - or another button that is sure to have user interaction (necessary for updating values).

    /* Submit Button*/
    saveInto:{
      a!save(
        ri!monitoringDetails.monitoringDay,
        if(
          fn!isnull(ri!monitoringDate),
          null,
          text(ri!monitoringDate,"dddd")
        )
      )
    }

Children