function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Devendra@SFDCDevendra@SFDC 

Rich Text Area field in Formula

Hello Board,

 

Salesforce doc says,

 

When a rich text area field is used in a formula, the HTML tags are stripped out before the formula is run. For example, when a rich text area field is used in a validation rule's criteria, the HTML tags are removed before the evaluation.

 

I am creating a cross object formula field with return type TEXT to access Rich Text Area field. But RTA field was not available there.

 

What I am missing here?

 

Thanks,

Devendra

bob_buzzardbob_buzzard

Rich/long text area fields aren't available for formulas.  If you need to pull this information through I think you'll need to use a workflow field update or trigger to copy it.

EnthEnth

Unfortunately the Workflow Field Update also loses the markup so best to stick to Apex Trigger solution

Hary KrishnaHary Krishna

Hi Enth,

 

Can you help to return Rich Text Area field for formula field. I got a situation where i needs to store so many values in the return type. Text Area is not sufficient for this.

 

Please suggest me.

 

Thanks

lifewithryanlifewithryan
If you want to eventually filter it out somehow, you'd likely have to have a trigger inspect the rich text field and if based on whether its null, populate a checkbox on the object that indicates the rich text field is not empty. Then later on in yoru  SOQL you can filter by that checkbox. (assuming you only cared whether is was populated or not which was my case...your situation could be rather different however).