Hey, Bionic Tricksters: How to Collapse Multiple Fields to One Field?

  • 1
  • Question
  • Updated 7 months ago
I want to give my support team a single field that simply lists a customer's use cases.

Our sales team provides this info by filling in 7 text fields -- one for each use case. If there's text in the field, it means that the customer has that use case. However, I don't want to inundate my support team with all that detail. I only want to tell them which fields have any content.

I would really like to avoid adding Salesforce fields for this single purpose.

I keep running into roadblocks in Bionic rules, such as:
  • Formula fields don't have an "If/Then" function.
  • When I count or Pivot records, I can't concatenate the results. The Concat function doesn't accept numeric fields.
  • If I try to do a separate task for each field, filtering to see if it's null, and then merge the results back together, I hit the limit of 15 tasks per Bionic rule.
Any creative ideas to get a single field that indicates which of several fields are not null??
Photo of Seth

Seth, Employee

  • 14,524 Points 10k badge 2x thumb

Posted 7 months ago

  • 1
Photo of Dan Ahrens

Dan Ahrens, Official Rep

  • 25,950 Points 20k badge 2x thumb
Hi Seth,

I'd do this with a rule chain. First rule evaluates the 7 text fields and writes to a custom MDA object that has one row of data per customer. If the use case is not null, the rule writes the name of that field to the corresponding column in the MDA object.

The second rule evaluates the MDA object and concatenates the values in each of the 7 columns per customer and will show which use cases have data (by showing the generic name of the use case, not the entire text of the use case). 
Photo of Seth

Seth, Employee

  • 14,524 Points 10k badge 2x thumb
Thanks Dan, it's a good point that I can get around this with the MDA. With the advent of Bionic Rules, I flipped a mental switch for "intermediate steps in MDA should no longer be necessary", but it may be unavoidable in this case.
Photo of Karl Rumelhart

Karl Rumelhart, Official Rep

  • 10,342 Points 10k badge 2x thumb
One other thought, Seth.  When do the pivot, you don't need to count things up.  You can actually have a fixed string that you populate when there are any values and then you can concatenate those strings.  My response in this thread might help -- though it didn't work for Andrew, unfortunately. 
Photo of Seth

Seth, Employee

  • 14,524 Points 10k badge 2x thumb
Thanks Karl! I'm not sure I'm able to use Pivot for this, but tell me if I'm wrong. The source data is in separate fields:
Account     Use Case 1     Use Case 2     Use Case 3
AccountA    blahblah                      blahblah
AccountB                   blahblah
AccountC                                  blahblah
I think what you're describing would would great if the source data structure were:
Account     Use Case Info
Account A   blahblah use case 1 blah blah
Account A   blahblah use case 3 blah blah
Account B   blahblah use case 2 blah blah
Account C   blahblah use case 3 blah blah

I think I would need 7 separate Pivot tasks, since each Pivot task can only Pivot on 1 field. Then I would need 7 separate Merge tasks, to bring the results together, and then a Transform test to do the concatenation. That brings me to 15, which doesn't give me room for the original fetch :-) Am I thinking about this right?
Photo of Karl Rumelhart

Karl Rumelhart, Official Rep

  • 10,342 Points 10k badge 2x thumb
Got it.  The other things I can think of also require many tasks.  E.g. you could do a fetch for the accounts with values in each column, then adding the strings you want and recombining.  
Photo of Karl Rumelhart

Karl Rumelhart, Official Rep

  • 10,342 Points 10k badge 2x thumb