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
Del_SantosDel_Santos 

Create a button (like a <li> tag in HTML) in the Formula (text) field

Hi,

 

Is there a way I can create a button (like a <li> tag in HTML) in the Formula (text).

I have a formula as below but instead of a dash I want it to be a <li>.

 

IF(INCLUDES(Documentary_Requirements__c,"Proof of Billing"), "- Proof of Billing" & BR(),"")

 

Actual Result:  - Proof of Billing

Desired Result: <li> Proof of Billing

 

Thanks in Advance

Del

MickleMickle

I don't think this can be done using one formula field, because the output cannot be a Rich Text Field. However, using a combination of a formula field, and a workflow rule to update a rich text field, this can be achieved. Depending on what your formula field is looking at, this may or may not help. (The limiting factor will be that Workflow rules can only run when a record is created or saved...so if the formula evaluates a date field, or another object without saving/editing the record, the Rich Text field will be outdated.

 

Plain Text Formula Field (hidden): 

 

 

IF( Amount > 10, "<li> true </li>", "<li> false </li>")

 

Empty Rich Text Area

 

Workflow Rule:

Evaluation Criteria: Every time a record is created or edited

Rule Criteria Opportunity: Created By NOT EQUAL TO null


Immediate Workflow Actions
Field Update 
Object => Opportunity   
Field to Update => Opportunity: RTF
Field Data Type=>Rich Text Area
Formula Value =>TextFormula__c

I tested it in my dev account, and everything seems to be working.

 

thomastthomast

What about the Bullet UTF-8 character? Works in my dev environment:

 

IF(INCLUDES(Documentary_Requirements__c,"Proof of Billing"), "• Proof of Billing" & BR(),"")

 

Alt+2022 (type the digits on the number pad while holding ALT key) should render this in Windows, else just copy and paste it. You could also look into using images in formulas if you want more flexibility or color - search "image formulas" in Help & Training for several good articles.