How-To: Convert Yes/No to Yes/Blank

Tow Options fields traditionally store values of Yes or No.  Sometimes you’d prefer that those No values were blanks so that the Yes ones really pop in views.

Using an option set instead of a Two Options field with options of Yes or Blank is a great way to accomplish this without any extra effort but if you’re in a bind and must use a Two Options field then you can accomplish the same by adding a real-time workflow that triggers on Create and Update of your two options field and sets that field to empty when it is No.  Worth noting, that this approach results in an extra round-trip to the database which will negatively affect performance so make sure the added value of this change is worth the performance hit.  An alternate and better performing approach would be to use a plugin that will execute in the pre-validation stage.

 

Walkthrough

Using the Account’s Credit Hold field as an example…

 

Add a new real-time workflow that triggers on create and when the Credit Hold field changes.  Add a conditional check for Credit Hold = No then add an update step to convert that No to an empty value:

image

The update step above is configured with the below:

image

This results in what would have been a ‘No’ converting to an empty value.

image

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s