Auto filled data in the form is not saving to DB

Use Case: A form as 10 fields out of which 4 are auto filled when a user lands on the page (auto filled fields are: 1. create date , 2. modified date, 3.created by and 4.modified by), rest 6 fields requires users input. When user saves the form by clicking on save button the system is giving the message as it is saved. However, it doesn't save the data to the DB.

While manual debugging when the user modifies the auto-filled fields and then clicks on save button then all the data in 10 fields are saving to DB. I am not sure what is missing.

I followed this tutorial to create this form -https://docs.appian.com/suite/help/21.3/Records_Tutorial.html

For autofill of 4 fields I have used following functions:

1. create date: local!storedValue:now()

2. modified date: local!storedValue:now()

3.created by: loggedInUser()

4.modified by: loggedInUser()

Can someone help in fixing this issue? Thanks!

  Discussion posts and replies are publicly visible

Parents Reply
  • a!localVariables(
                  local!now: now(),
                  a!dateTimeField(
                    label: "Created Ts",
                    labelPosition: if(
                      ri!readOnly,
                      "ADJACENT",
                      "ABOVE"
                    ),
                    value: local!now,
                    saveInto: {a!save(ri!LOB_LIST.created_ts, local!now)},
                    required: true,
                    readOnly: ri!readOnly,
                    disabled: true
                  )
                ),

    I still used the a!save() i tried directly with the value and also saving an value to the local variable but, still i don't see it getting save in the list of values. so my table is getting written with null values.

    any idea what i am missing above?

Children
No Data