Skip to main content
sarahmiracle
VIP ⭐️⭐️⭐️⭐️⭐️
Jul 21, 2023 12:02 AM UTC
New Idea

Allow for inserting Null values in case expressions

Related products:CS Other Features

It would be great if we could insert Null values for Case Expressions. The current configuration requires us to provide a value, even if that value is a Custom value.

Use Case:

  • I’m calculating an “Age” field for a professional services project. If the project is still Active, I want to insert my calculated Project Age field. If the project is not still Active, then I want a Null value. 

I can’t accomplish this use case as Case Expressions require a value.

15 replies

sarahmiracle
VIP ⭐️⭐️⭐️⭐️⭐️
Jul 21, 2023 12:03 AM UTC

This was in Data Designer -- I haven’t tested if I can insert a Null value in Case Expressions in Horizon Rules, but I will assume I cannot given the UIs are very similar. I’m not sure if I could have done this in Bionic (can’t remember...)

Translate
Customer Success Systems Admin @ Amplitude, 3x Gainsight CS Ops Product Council Member
jparker
Contributor ⭐️⭐️⭐️⭐️⭐️
Jul 21, 2023 8:27 AM UTC

I’d definitely like to have an explicit NULL value too, but I think the workaround to this is putting a space as the custom value and it acts like NULL

Translate
Looking for my next role: Gainsight Lead / CS Ops Product Council Member. Let's connect: https://www.linkedin.com/in/jon-parker/
matthew_lind
VIP ⭐️⭐️⭐️⭐️⭐️
Jul 21, 2023 3:17 PM UTC

I’m upvoting….and in the meantime I’ve previous tackled this with a very poor work-around.

  1. Create a custom field in an object. The sole purpose of this custom field is to be a Null. No default values, no rules to populate. It literally just sits there.
  2. Pull that custom field into your fetch. Then in your CASE statement, when you need the Null, you “populate” your CASE statement by pointing at that custom field.

I agree that the product could ideally do this as Sarah proposes, but if you really need it now, you’ve got a work-around.

Translate
Making people their best....currently disguised as a CS Ops Architect. How can I contribute to your success?
sarahmiracle
VIP ⭐️⭐️⭐️⭐️⭐️
Jul 24, 2023 7:13 PM UTC

I think the workaround to this is putting a space as the custom value and it acts like NULL

 

@jparker actually, in DD and Horizon Rules, it won’t accept a space as a custom value! I believe old Bionic Rules case statements might have allowed this, but it isn’t allowed in DD or HRE 😔

Translate
Customer Success Systems Admin @ Amplitude, 3x Gainsight CS Ops Product Council Member
jparker
Contributor ⭐️⭐️⭐️⭐️⭐️
Jul 25, 2023 9:04 AM UTC

That’s strange. I just double-checked and I can create a new HR and use a space as the custom value for the case expression output. Leaving it blank throws an error when I first save but having a space allows it to be saved.

Translate
Looking for my next role: Gainsight Lead / CS Ops Product Council Member. Let's connect: https://www.linkedin.com/in/jon-parker/
jparker
Contributor ⭐️⭐️⭐️⭐️⭐️
Jul 25, 2023 9:14 AM UTC

Actually, I think the difference between mine working and yours not working is that I’m using a string field and you’re using a number 

Translate
Looking for my next role: Gainsight Lead / CS Ops Product Council Member. Let's connect: https://www.linkedin.com/in/jon-parker/
sarahmiracle
VIP ⭐️⭐️⭐️⭐️⭐️
Jul 26, 2023 10:05 PM UTC

@jparker ah!! Yes, you are onto something!!

Translate
Customer Success Systems Admin @ Amplitude, 3x Gainsight CS Ops Product Council Member
andy_roy
Helper ⭐️
Aug 24, 2023 7:13 PM UTC

Upvoted.  I was going to concat a list of Case fields.  Even if I can use a space, that will probably generate some clunky results.  Back to the (very messy) drawing board...

Translate
romihache
VIP ⭐️⭐️⭐️⭐️⭐️
Feb 14, 2024 9:56 AM UTC

Absolutely agree! 
So many extra transforms could be avoided! If the output is a string, I do the case with a space as output in lieu of null,  and then a full trim to have an actual null, but this workaround only works for a string output as noted above. 
Matthew’s workaround is the way I do this if is a numeric field (btw, thank you @sarahmiracle and @matthew_lind for your help -many moons ago- via Slack about this!)
 

There are two other ideas asking for the same, can they be merged @anirbandutta ? As rules engine and DD have now the same interface, they are all asking for the same 😁 (Bradley also noted that in the second idea)

 

 

Translate
Continuous improvement is better than delayed perfection
alizee
VIP ⭐️⭐️⭐️⭐️⭐️
Oct 8, 2024 1:59 PM UTC

Hello!

In the old rules and query builder, we could set string default values to null.

 

In Horizon Rules / Dynamic JO, we can’t: 

Meanwhile, a boolean can be null. 

If every field can be null including booleans (excluding GSIDs), then surely the default value for a string should be able to be null. 

This is inconsistent and somewhat illogical on top of being annoying for concat formulas. 

Please fix this!

A

Translate
The most expensive part of building is the mistakes. That's true in construction. Not so much in CSOps. So ask questions, make mistakes and learn. All views expressed here are my own.