Trouble saving values to a CDT in my form

Hi All, I seem to be having trouble saving form values to a CDT in my form. If I save the values to any other field type, e.g. Text or Boolean etc, the data is submitted correctly. However when I save the form data to a CDT, it is either not saving correctly or I am not retrieving it correctly as the pv! values are blank. To test my work, I am trying to email the output to myself on Submit. When I test the form in the design window, I can see the values being added to the CDT, so I assume I am doing this part correctly. The code for my form is:

a!formLayout(
label: "Delete Existing Computer Access",
firstColumnContents: {
a!textField(
label: "",
labelPosition: "ABOVE",
instructions: "It is requested the following account be removed from the university email system, as they are no longer employed by the University of South Australia:",
saveInto: {},
refreshAfter: "UNFOCUS",
readonly: true,
validations: {}...

OriginalPostID-202811

OriginalPostID-202811

  Discussion posts and replies are publicly visible

  • ...
    ),
    rule!COMMON_staffCustomFieldPicker(
    label: "Applicant",
    required: true,
    value: ri!decaRequest.applicant,
    validations: {},
    saveIntoExtra: {
    ri!decaRequest.applicant
    },
    labelPosition: "ADJACENT"
    ),
    a!textField(
    label: "Employee ID Number",
    labelPosition: "ADJACENT",
    value: ri!decaRequest.employeeID,
    saveInto: ri!decaRequest.employeeID,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!dateField(
    label: "Effective Date",
    labelPosition: "ADJACENT",
    value: ri!decaRequest.effectiveDate,
    saveInto: ri!decaRequest.effectiveDate,
    validations: {}
    ),
    rule!COMMON_staffCustomFieldPicker(
    label: "Authorising Signatory",
    required: true,
    value: ri!decaRequest.authorisingSignatory,
    validations: {},
    saveIntoExtra: {
    ri!decaRequest.authorisingSignatory
    },
    labelPosition: "ADJACENT"
    ),
    ...
  • ... a!paragraphField(
    label: "Application Declaration",
    labelPosition: "ADJACENT",
    value: "In requesting this deletion, I accept the following conditions:
    ",
    saveInto: {},
    refreshAfter: "UNFOCUS",
    readonly: true,
    height: "TALL",
    validations: {}
    ),
    a!paragraphField(
    label: "1.",
    labelPosition: "ADJACENT",
    value: "The account name will be displayed on the Global Address list with 'left' appended from the effective date specified.",
    saveInto: {},
    refreshAfter: "UNFOCUS",
    readonly: true,
    height: "SHORT",
    validations: {}
    ),
    a!paragraphField(
    label: "2.",
    labelPosition: "ADJACENT",
    value: "I will be given access to the former staff members' mailbox as a Delegate. If contacted by the former staff member, I will be responsible for forwarding personal mail messages to former staff member.
    ",
    saveInto: {},
    refreshAfter: "UNFOCUS",
    r...
  • ... eadonly: true,
    height: "SHORT",
    validations: {}
    ),
    a!paragraphField(
    label: "3.",
    labelPosition: "ADJACENT",
    value: "Mail messages relating to university matters are considered to be institutional property and will therefore be dealt with by the University of South Australia. These messages will not be disclosed OR forwarded to the former staff member.",
    saveInto: {},
    refreshAfter: "UNFOCUS",
    readonly: true,
    height: "MEDIUM",
    validations: {}
    ),
    a!paragraphField(
    label: "4.",
    labelPosition: "ADJACENT",
    value: "After three months, the entire mailbox for the staff member will be archived, then deleted from the Exchange server. The University of South Australia is under no obligation to migrate old email messages on legacy mail software to MS Exchange OR to keep old email messages of staff who are no longer employed by the university.",
    saveInto: {},
    refreshAfter: ...
  • ... "UNFOCUS",
    readonly: true,
    height: "MEDIUM",
    validations: {}
    ),
    a!paragraphField(
    label: "5.",
    labelPosition: "ADJACENT",
    value: "Unless under special circumstances, archived messages may be recovered, up to a period of 1 year. In such situations, formal request is required stating the reasons for recovery and the date/period of the mail messages. This request must be submitted to IT Help Desk.",
    saveInto: {},
    refreshAfter: "UNFOCUS",
    readonly: true,
    height: "MEDIUM",
    validations: {}
    ),
    a!radioButtonField(
    label: "",
    labelPosition: "ADJACENT",
    choiceLabels: {"I agree", "I do not agree"},
    choiceValues: {true, false},
    value: ri!decaRequest.applicationDeclaration,
    saveInto: ri!decaRequest.applicationDeclaration,
    choiceLayout: "STACKED",
    validations: {}
    )},
    secondColumnContents: {},
    buttons: a!buttonLayout(
    primaryButtons: {
    ...
  • ... a!buttonWidgetSubmit(
    label: "Submit",
    style: "PRIMARY"
    )
    }
    )
    )

    In my email, I am trying to put the CDT values in to the body of the email using:

    ="Request Data: " & pv!decaRequest.id & ", Applicant: " & pv!decaRequest.applicant

    I also tried unsuccessfully outputting the values as:

    ="Request Data: " & pv!decaRequest

    Any thoughts on what I might have done wrong?
  • In your code you use the parameter "saveIntoExtra" which does not exist. I suggest to replace it with "saveInto". Then make sure that the mapping of the process variables to the form fields in the user input task are correct. In addition you can add a debugging text field that just shows your data structure.
  • 0
    Certified Lead Developer
    Make sure you're passing the params as ac! and not pv! when you set up the form in the process model
  • Thanks All, I think I have this sorted out now. Appreciate the input.