So I have a multi-select picklist with 4 possible values on it. I would like to have them displayed on the custom visual force page I am making on line indents (li) rather than seperated with a semicolon. I have tried using the substitute function to replace ; with li but it does not appear to work. the substitute function works with br and will show it on a new line, but is there a way to do this that will allow the multi-select to be displayed on bullet points?

Here is the following line of the visualforce page that will display the pick list:

<li><apex:outputText escape="false" value="{!SUBSTITUTE(Loan_Proposal__c.Standard_Conditions__c,';','<li/>')}"/></li>
  • Are you using a standard controller or an extension for this? – Sebastian Kessel Oct 30 '18 at 16:41
  • @SebastianKessel No I am not, this visualforce page is used to render a record into a PDF to be printed. – Storm Martinous Oct 30 '18 at 17:17
  • The last parameter in the substitute function should be '<li>' instead of '<li/>'. See if that does it. – Shane Steinfeld Oct 30 '18 at 23:07

I tried in my de and it works . Just replace with 'Opportunity.Other_Delivery_Locations__c' your custom field :

<apex:outputText escape="false" value="<li>{!SUBSTITUTE(Opportunity.Other_Delivery_Locations__c,';','<li/>')}"/>

The output in my screen looks like this

  • Australia - AU
  • New Zealand - NZ
  • United States - US

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.