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
Tushar sharmaTushar sharma 

How to use Merge field in if condition

I am using merge field in if condition command link tag but it don't get any value.
<apex:repeat value="{!st}" var="lable">

<apex:commandLink action="{!getValue}" value="{!lable}  {!IF(sortField=='{!lable}',IF(sortDir=='ASC','↑','↓'),'')}" rerender="showRecord" status="actStatusId">



Here IF(sortField=='{!lable}' here {!lable} don't get any value how to do this
Best Answer chosen by Tushar sharma
shiv@SFDCshiv@SFDC
You need to write condition like this
 

{!IF(condition,'YES','NO')}


All Answers

shiv@SFDCshiv@SFDC
You need to write condition like this
 

{!IF(condition,'YES','NO')}


This was selected as the best answer
Deepak Kumar ShyoranDeepak Kumar Shyoran
Try this <apex:commandLink action="{!getValue}" value="{!lable}  {!IF(sortField== lable,IF(sortDir=='ASC','↑','↓'),'')}" rerender="showRecord" status="actStatusId" />