Former_Member
9 years agoAccelerator III
Server Method for validating multiple on Tab
Hello,
I am working on creating a method to validate if all check boxes on a related item tab have been checked at the time of activity voting. The thought was to throw an error if a box is unchecked when the user try's to vote to prevent premature exiting of an activity.
The checkbox has been added to the related item itemtype as a Boolean property called "is_completed". My thought was to create a method and attach to the workflow server event using "On Vote" for the activity, however, I cannot seem to nail down a conditional field.
I have tried many variations of methods unsuccessfully so hopefully what is below will adequately represent the intent enough to give people an idea of what I am trying to do, (so for the unsophisticated approach, I am a mechanical engineer):
Innovator inn = this.getInnovator();
string AML = "<AML><Item type='OB Day 1' action='get' select='is_completed' where='[OB_Day_1].is_completed=0'><is_completed condition='eq'>0</is_completed></Item></AML>";
Item result = inn.applyAML(AML);
if (AML = "0"); {
return inn.newError("All items have not been checked off as Completed on the Day 1 Tab!");
}
return result;
Thank you in advance for looking at this, I looked forward to your response.