• George Tasker 10
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi All,

when i try to pass value it shows Formula Expression is required on the action attributes When checkbox clicked in UI

Visual Page

                   <apex:inputcheckbox value="{!allbranch}"> 
                        <apex:actionSupport event="onchange" action="{!selectedvalue}" reRender="out"/>
                    </apex:inputCheckbox> All Branch <br/>
                    <apex:inputcheckbox value="{!branch1}"> 
                        <apex:actionSupport event="onchange" action="{!selectedvalue}" reRender="out"/>
                    </apex:inputCheckbox> branch1<br/>

Apex

public boolean allbranch{get;set;}
 public boolean branch1{get;set;}​

public String selectedvalue(){
        String query = '';
        if(allbranch == true)
        {
          // System.debug('Ouput Value---------------------------- allbranch'+allbranch);
           query = '';
        }
        if(branch1== true)
        {
           //System.debug('Ouput Value---------------------------- '+branch1);
           query = 'Branch__c = XXXX';
        }
       System.debug('*************************************query Value ---'+query);
        return query;       
    }
       
    public PageReference pageLoad() {
       city = selectedvalue();
       //System.debug('Selected city:------------------------ '+city);
}

Can any one try to resolve this problem.

Thank you..