Contact Us Today!

How to Count Yes/No Fields using the Increment By Operation in Dynamics 365

How to Count Yes/No Fields using the Increment By Operation in Dynamics 365

Suppose you have a set of Yes/No fields, and you wanted to count how many of those fields were marked "yes." This can be accomplished easily by using a workflow with the Increment By Operation in Dynamics 365.

Increment By Operation

Here, we have a custom entity with 5 Yes/No fields. We'll score the questionnaire, 1 point for each field checked as "Yes," and present the score at the bottom of the form.

First, create a workflow and set it to run on the change of any of the Yes/No Fields. Then, add an Update step and clear the Score field.

Increment By Operation

This is to ensure that the Score is always accurate, even if the record is changed multiple times.

Next, we'll add a conditional statement and check to see if the first question is set to "Yes."

Increment By Operation

Lastly, within that condition, we'll add an Update step and Increment the Score field.

Increment By Operation

Repeat these two steps, adding a condition and an update step for every field set to "yes," and you should have a workflow that looks like this:

Increment By Operation

And that's it! The Score field will be incremented based on how many fields are set to "Yes."

Increment By Operation

Contact Us!

Beringer is always here to provide expert knowledge in topics like these. Contact us with any questions you may have.

Beringer Technology Group, a leading Microsoft Gold Certified Partner specializing in Microsoft Dynamics 365 and CRM for Distribution. We also provide expert Managed IT Services, Backup and Disaster Recovery, Cloud Based Computing and Unified Communication Solutions.


theProfessor

theProfessor

Rob is the CTO of Beringer Technology Group, and focuses his efforts on software development, cloud engineering, team mentoring and strategic technical direction. Rob has worked with Beringer since 2005, and has influenced every department from Development, Security, Implementation, Support and Sales. Rob graduated with his MBA from Rowan University in 2012, earned his Bachelors of Computer Science in 1997, and is current with several Microsoft technical certifications. Rob is very active, and loves to mountain bike, weight train, cook and hike with his dog pack.