I have this checkbox when checked sets the priority on the case. Currently the value is defaulted to 0. When its set the value updates from 0 to 100 and I should be able to check the value and if its 100 when the end user returns they will see the box is checked and can uncheck it to reset the case value back to 0.
Currently I have the functionality of setting/saving the value updating the case all working with a process model. Even when they return they can check the box again and it will set the value back to 0. But I cannot figure out how to keep the box checked like the screenshot when the end user returns. It’s always unchecked.
local!choices: if(local!case.priorityRank > 0, 0, 100), local!updatePriorityRank: null, a!sectionLayout( label: "", contents: { a!sectionLayout( label: "Case Priority", contents: { a!checkboxField( label: "", choiceLabels: {"Priority"}, choiceValues: {local!choices}, value: local!updatePriorityRank, saveInto: local!updatePriorityRank, choiceStyle: "STANDARD" ) } )
Discussion posts and replies are publicly visible
I mean, your problem is right there...
Care to expand on that a bit ? Removing the null does nothing to resolve the issue.
You're initializing that local variable to a hardcoded value of null. The checkbox field uses that local variable for its value and saveInto parameters. I'm not clear what you were expecting it to do, but under this setup, it will only ever initialize to a state of unchecked.
I stated what I was trying to figure out how to accomplish behavior wise and that I was struggling to find a way to do it. I provided my code to show my setup for guidance. Is that not the point of this forum?
Sorry, not meaning to sound snippy or anything, it's just often a struggle to discern the intent based on the limited amount of detail available in posts like this.
I think I see what you're getting at now - let me take a stab at it.