+ Start a Discussion
MrSalesForceMrSalesForce 

Formula field including br() to render as a <BR> and not a text string.

How do i get a formula field including br() to actually render a row break instead for showing the text string? 

 

Im using the following code to display a message if the entry criteria for an approval process has not been met. 
The "Missing_needed_fields_for_approval__c"-field is a formula that includes BR(). This renders perfectly on the standard page layout but not in my output text block. In the text block the text BR() is displayed.

Is there any way of getting the formula BR() to be rendered as a <BR/>? 

 

       <!-- APPROVAL ENTRY CRITERIAS -->
       <apex:OutputText escape="false" rendered="{!OR(flight__c.Customer_approved__c == '',flight__c.C_Opportunity_won__c =='', flight__c.C_Simulation_completed__c =='' ) }">
           <br/>
           <div style="border:1px solid red; padding:10px; margin:20px; background-color:#f1cccc;">
           <b>Before submitting this flight for approval you need to fix the following:</b><br/> 
	       {!Flight__c.Missing_needed_fields_for_approval__c}
           </div>
           <br/>
       </apex:outputText>

 

FYI : Im a beginner to apex :)

 

Best Answer chosen by Admin (Salesforce Developers) 
RustanRustan

try this:

 

<apex:outputText value="{!Flight__c.Missing_needed_fields_for_approval__c}" escape="false"/>

 

 

use that instead of {!Flight__c.Missing_needed_fields_for_approval__c}

All Answers

RustanRustan

try this:

 

<apex:outputText value="{!Flight__c.Missing_needed_fields_for_approval__c}" escape="false"/>

 

 

use that instead of {!Flight__c.Missing_needed_fields_for_approval__c}

This was selected as the best answer
MrSalesForceMrSalesForce

Sweeet. I love you