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
RbnRbn 

Re:replacing boolean values with String

Hi,

 

I ahve a column in the page block table which dispays Boolean value  .

 

I want to replace this boolean value like if it is true:it should display as Note else it should display as Attachment.

 

 

Thanks in Advance

souvik9086souvik9086

You can create a formula field that if the value is true store as Note and else as Attachment.

 

Then display that formula field in the PageblockTable.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

RbnRbn
Thanks for the quick reply.
I can not create a formula field since the column where i want to display the value is a attribute of Notes and attachment ()Attribute::IS NOTE
Dhaval PanchalDhaval Panchal

try this

 

<apex:pageBlockTable id="tbl" value="{!yourList}" var="val">
	<apex:column headerValue="your column name">
		<apex:outputText value="{!if(val.booleanfield==true,'Note','Attachment')}"/>
	</apex:column>
</apex:pageBlockTable>