how to pass a cdt through an interface

Certified Associate Developer
Happy Friday Appian Community ,
I cannot figure out how to pass data though an interface a second time.
I have tried to copy how it was done in the first write to data store.
maybe I am trying to save it in to many different places?
here is my submit buttons code: 
primaryButtons: {
      a!buttonWidget(
        label: "Approve",
        icon: "check",
        value: true(),
        saveInto: {
          a!save(ri!GFIM_User_Access_User_Information,ri!GFIM_User_Access_User_Information),
          a!save(ri!GFIM_User_Access_User_Information.supervisorsDecisionDate,now()),
          a!save(ri!GFIM_User_Access_User_Information.supervisorDecision,true)
          },
        submit: true,
        style: "PRIMARY"
      )
    },
here is my user form input
output
write to data store input
output:
anything you could advise would be helpful.
thanks,
Kevin

  Discussion posts and replies are publicly visible

Parents Reply
  • As Mike notes, please expand the userInformation variable in the Rule Inputs area to verify data is saving on the form, when you click your buttons in /design.  Additionally, remove the "a!save(ri!userInformation,ri!userInformation)" in both submit buttons.  Once we can confirm data is saving on the form we can move to monitoring the process instance to review variable updates in Process History.

Children
  • 0
    Certified Lead Developer
    in reply to Chris
    Additionally, remove the "a!save(ri!userInformation,ri!userInformation)" in both submit buttons. 

    Shoot, I missed the fact that that was still there - it was the first save previously i think, so wasn't looking at the end of the save list.  luckily i think in this case it wouldn't be causing anyhing to get lost since the a!save()s are executed in order, so it would just be (redundantly) saving its current value back into itself.

  • 0
    Certified Associate Developer
    in reply to Chris

    it works! thank you guys so much!

    for anyone checking on this later the bug was solved by making sure that there were no duplicate saves.

    here the code that works for anyone that is checking later

     buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidget(
            label: "Approve",
            icon: "check",
            value: true,
            saveInto: {ri!userInformation.supervisorDecision,
            a!save(ri!userInformation.supervisorsDecisionDate,now())
              },
            submit: true,
            style: "PRIMARY"
          )
        },
        secondaryButtons: {
          a!buttonWidget(
            label: "reject",
            icon: "exclamation-triangle",
            value: false,
            saveInto: {
              ri!userInformation.supervisorDecision,
              a!save(ri!userInformation.supervisorsDecisionDate,now())
            },
            submit: true,
            style: "DESTRUCTIVE",
            validate: false
          )
        },
        showWhen: or(
          isnull(
            ri!readOnly
          ),
          not(
            ri!readOnly
          )
        )
      )