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" ) },
Discussion posts and replies are publicly visible
Chris said: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.
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 ) ) )
Great!