You need to sign in to do that
Don't have an account?

rendered condition not working please help
rendered condition with if statement not wokring. I want to show only records which are matching with the account owner emails.
controller code:-
<apex:page controller="inputfieldsexample1" showHeader="false"> <apex:form > <apex:variable var="coo" value="{!$User.Email}" /> .......... {!coo} <apex:pageblock > <apex:pageblocktable value="{!accs}" var="a"> <apex:column value="{!a.id}" rendered="{ !If(a.owner.email == 'coo' ,true,false) }" /> <apex:column value="{!a.name}" /> <apex:column value="{!a.industry}" /> <apex:column value="{!a.owner.email}" /> </apex:pageblocktable> n merge field, like {!$User.Email}..........{!$User.Id}. </apex:pageblock> </apex:form> </apex:page>
controller code:-
public class inputfieldsexample1 { public account acc{set;get;} public string email1 {set;get;} public list<account> accs{Set;get;} public inputfieldsexample1 () { email1='prasanth523001@gmail.com'; accs=[select id,name,industry,owner.email,owner.id from account where name='anmesh' or name='anmesh1' ]; } }
Please use below code:
I tested the above code and it is working fine in my DE environment.
Please do let me know if it helps you.
Regards,
Mahesh