Get Your Discount!

Forums

Search  Users  Rules 
Close
Login:
Password:
Forgot your password?
Register
Login
 
Pages: 1
Reply
Webform result filter with OR condition
 
Hello,

i want to filtered result from webform result based on filter however when i try to filter value all time AND condition checked by default however i want to filter with OR condition.

my code:
Code
/** Added By Nishant**/
      if(!$USER->IsAdmin()) {
         $arFilter["leave_request_form_line_manager_email_USER_text"]=CUSER::GetEMAIL();
         
         $arFilter["leave_request_form_head_of_department_email_USER_text"]=CUSER::GetEMAIL();
         
         $arFilter["leave_request_form_hr_manager_email_USER_text"]=CUSER::GetEMAIL();

      }
        
      $rsResults = CFormResult::GetList($arParams["WEB_FORM_ID"], $arParams["by"], $arParams["order"], $arFilter, $arResult["is_filtered"]);
 
Result:
Blank:

Only one condition:


Code
/** Added By Nishant**/
      if(!$USER->IsAdmin()) {
         $arFilter["leave_request_form_line_manager_email_USER_text"]=CUSER::GetEMAIL();         
      }
        
      $rsResults = CFormResult::GetList($arParams["WEB_FORM_ID"], $arParams["by"], $arParams["order"], $arFilter, $arResult["is_filtered"]);



Result:
Got 1 result with perfect filtration


Please advice how we can filter with or condition?

Thanks
- Nishant
 
Is this the same with your email problem?
Works like a charm..

Pages: 1
Reply
Users browsing this topic
Reply form
Enter your Post*
More
Files:
Drag and drop one or more files here
or select a file from your computer
Files:
Upload files
 

Bitrix Partner Network has more than 7,000 IT professionals who put their trust in our technologies and assist customers with installation and maintenance. All Bitrix Partners enjoy lucrative discounts on our products and services. Join our Partner Network now! Submitting a Bitrix Partner application is very easy and quick!
Partner Program
Free Online Training
Subscribe to Bitrix News