Skip to main content
February 25, 2022
Question

How would you accomplish moving the value of one input rule to another?

  • February 25, 2022
  • 3 replies
  • 0 views

Lets say you have a form with a textbox name.

The form populates from a DB tableA. What is the recommended way of saving it into DB tableB?

I experimented with the following:

1.

a!pickerFieldUsers(
  label: "Name",
  labelPosition: "ABOVE",
  value: if(isnull(ri!tableB.firstlastname), ri!tableA.requestaddedby, ri!tableB.firstlastname),
  saveInto: ri!tableB.firstlastname,
  readOnly: true,
  validations: {}
)

2. putting   a!save(ri!record.requestdateadded, now()), in the submit button etc.

Another idea was to keep the same rule input and handle it at "Write to DSE" in the process.

3 replies

danny.verb
February 25, 2022

What you have is totally fine, saving fields such as 'modifiedBy' and 'modifiedOn' when the submit button is clicked is a good practice. 

February 25, 2022

What if I need to bring in some information beforehand, that means i need to display the title of a user in the form?

                                  item: a!textField(
                                    label: "Position",
                                    labelPosition: "ABOVE",
                                    value: user(ri!record.requestaddedby, "titleName"),
                                    saveInto: ri!order.position,
                                    refreshAfter: "UNFOCUS",
                                    validations: {}
                                  )

gopalk2865
Participating Frequently
February 25, 2022

Hi , Could you please let us know your use case so that we can provide you more accurate answers.?