back to top

Adding Yes/No display for boolean fields in InforCRM (SalesLogix) datagrids

InforCRM has had the ability to define boolean entity properties as either True/False or Yes/No for a long time, however in a recent project, I found that displaying such an entity property as a bound field in a Data Grid would always display True or False (or nothing, if not set) regardless if it was set as a Yes/No data type.

In this project, the client wanted to display either Yes or No in the datagrid.  I also wanted to account for unset values, showing “No” if the underlying property was null.  To accomplish this, I turned to a Custom Format column in the datagrid.

Ryan previously posted a great article describing how to use of custom format columns to link to external sites, and I did something similar to display my desired values.

In the datagrid properties, I added a new Custom Format column, set the datafield to my boolean entity property and gave the method I was going to create a name of booleanDisplay in the Format Method Name property.  For the actual method, I included the following:

protected string booleanDisplay(object boolValue)
{
    bool val;
    if (boolValue != null)
    {
        val = (bool)boolValue;
    }
    else
    {
        val = false;
    }

    if (val)
    {
        return "Yes";
    }
    else
    {
        return "No";
    }
}

A couple notes on that code:  The method defined will always need an Object defined as the method parameter.  This required me to then check to see if the property had passed a null to the method.  If not, I cast the value to a new boolean variable. If it is null, I set the boolean variable to false.  Once I had my boolean variable, I simply had to evaluate it and return a “Yes” if true, or “No” if false.

All in all, this was a very simple way to evaluate a boolean entity property, and return Yes or No (or any value, really) based on the result, while also accounting for a potentially null value in the entity property.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Jason Buss
Jason Buss
Jason is a senior application developer with Customer FX.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM 10: Phone Number “Starts With” Search Not Working with Formatted Numbers

Infor CRM 10's Starts With search may fail to find phone numbers stored with formatting characters. Learn why this happens, how to identify affected records, and how to resolve the issue.

Increase Attachment Size Allowed in the Infor CRM SLX Web Client

It is possible to increase Infor CRM SLX's limit on the size of a file that can be uploaded by editing values in web.config file.

A Closer Look at the AI Features in Infor CRM v10

Infor CRM v10 includes several built-in Generative AI features that go beyond a simple chatbot. Here's a closer look at AI Summary, AI Assistant, AI Newsfeed, and AI-assisted email drafting.

[Webinar] Infor CRM SLX Admin Essentials: Xbar for Web and Email Marketing

On Tuesday, September 15, 2026, Infor is hosting an...

Infor CRM Mobile 4.4 Now Available: What’s New

Infor CRM Mobile 4.4 is now available for single-tenant cloud and on-premises customers. Explore business card capture, dashboards, workflows, and more.

Related Articles

Infor CRM 10: Phone Number “Starts With” Search Not Working with Formatted Numbers

Infor CRM 10's Starts With search may fail to find phone numbers stored with formatting characters. Learn why this happens, how to identify affected records, and how to resolve the issue.

Increase Attachment Size Allowed in the Infor CRM SLX Web Client

It is possible to increase Infor CRM SLX's limit on the size of a file that can be uploaded by editing values in web.config file.

A Closer Look at the AI Features in Infor CRM v10

Infor CRM v10 includes several built-in Generative AI features that go beyond a simple chatbot. Here's a closer look at AI Summary, AI Assistant, AI Newsfeed, and AI-assisted email drafting.

[Webinar] Infor CRM SLX Admin Essentials: Xbar for Web and Email Marketing

On Tuesday, September 15, 2026, Infor is hosting an administrator-focused webinar covering two areas that can help organizations...

Related Videos