+ 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" />