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 ServicesBackup and Disaster RecoveryCloud Based Computing and Unified Communication Solutions.