Hi folks. Feeling good to back and write something useful. So today am gonna write about formula field effects.
Scenario : I have checkbox fields for sunday, monday, tuesday, wednesday, thursday, friday and saturday. I want to show only days that are true with comma separated strings. Below picture depicts the checkboxes.
I've checked Monday and Thursday checkboxes. So output should be Moday, Thursday.
Go to fields -> Create new fields -> Formula Field. I'm gonna call it as "True Days"
So do the formula now to bind only true days,
True_Days__c =
IF(Sunday__c, 'Sunday' & IF(
OR(Monday__c, Tuesday__c, Wednesday__c, Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Monday__c, 'Monday' & IF(
OR(Tuesday__c, Wednesday__c, Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Tuesday__c, 'Tuesday' & IF(
OR(Wednesday__c, Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Wednesday__c, 'Wednesday' & IF(
OR(Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Thursday__c, 'Thursday' & IF(
OR(Friday__c, Saturday__c), ',', ''
), '') &
IF(Friday__c, 'Friday' & IF(Saturday__c, ',', ''), '') &
IF(Saturday__c, 'Saturday', '')
From above formula field, we are just binding only the true values. Now save the field and see the formula field in detail page. Magic happened. It is not appending comma's before and after the strings.
put your thoughts in comments. Thanks!.
Scenario : I have checkbox fields for sunday, monday, tuesday, wednesday, thursday, friday and saturday. I want to show only days that are true with comma separated strings. Below picture depicts the checkboxes.
Checkboxes |
I've checked Monday and Thursday checkboxes. So output should be Moday, Thursday.
Go to fields -> Create new fields -> Formula Field. I'm gonna call it as "True Days"
So do the formula now to bind only true days,
True_Days__c =
IF(Sunday__c, 'Sunday' & IF(
OR(Monday__c, Tuesday__c, Wednesday__c, Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Monday__c, 'Monday' & IF(
OR(Tuesday__c, Wednesday__c, Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Tuesday__c, 'Tuesday' & IF(
OR(Wednesday__c, Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Wednesday__c, 'Wednesday' & IF(
OR(Thursday__c, Friday__c, Saturday__c), ',', ''
), '') &
IF(Thursday__c, 'Thursday' & IF(
OR(Friday__c, Saturday__c), ',', ''
), '') &
IF(Friday__c, 'Friday' & IF(Saturday__c, ',', ''), '') &
IF(Saturday__c, 'Saturday', '')
From above formula field, we are just binding only the true values. Now save the field and see the formula field in detail page. Magic happened. It is not appending comma's before and after the strings.
Formula Field |
put your thoughts in comments. Thanks!.
This is very nice post im very like it and i appreciate you for good work keep it up it is very useful for me.
ReplyDeleteStruts Training in Chennai
Struts Training
Wordpress course in Chennai
Wordpress Training Chennai
Wordpress Training in Adyar
Wordpress Training in OMR
Struts Training
Struts Training in Chennai
The Casinos of the US - DrmCD
ReplyDeleteThe casinos of the United States are located in New Orleans 영주 출장마사지 and If you 사천 출장안마 are in a 인천광역 출장마사지 state that is not located in 인천광역 출장마사지 the US, 춘천 출장샵 you can stay in the casino and