Quantcast
Channel: Active questions tagged fields - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 57

Text Formula String Concatenation - Omit Trailing Comma

$
0
0

Scenario : I have 7 checkbox fields. For example say it is Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday. In Formula field I want to display all that are true as comma separated text in order from Sunday thru Saturday.

For example:

Sunday - True
Friday - True

Formula Field should be - Sunday, Friday.

I tried below formula for concatenating but comma's are coming extra if any one of the field is false.

IF( Sunday__c = true, 'Sunday', '') +','+IF( Monday__c= true , 'Monday', '')+','+IF( Tuesday__c= true , 'Tuesday', '')+','+IF( Wednesday__c= true , 'Wednesday', '')+','+IF( Thursday__c= true , 'Thursday', '')+','+IF( Friday__c= true , 'Friday', '')+','+IF( Saturday__c= true , 'Saturday', '')

Note : I don't want to go for trigger


Viewing all articles
Browse latest Browse all 57

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>