$search_criteria['field_filters'][] = array('key' => 4, "value => $meeting_date);
GFCommon::log_debug(__METHOD__."(): Entrytest {$entries}.");
With the above code, logging shows Array. Should I do var_dump() on entries, it shows “array(0) { }”. If I do var_dump without the search to find the entry key, date entry is in [4].
My question is: Is the ‘key’ in search criteria the name of the field? or the above mentioned [4]? I have tried both scenarios, but both gives me empty outcome.
array(6) { [0]=> array(31) { ["id"]=> string(3) "829" ["form_id"]=> string(2) "18" ["post_id"]=> NULL ["date_created"]=> string(19) "2022-03-17 14:35:44" ["date_updated"]=> string(19) "2022-03-17 14:35:44" ["is_starred"]=> string(1) "0" ["is_read"]=> string(1) "0" ["ip"]=> string(15) "0" ["source_url"]=> string(61) "placeholder" ["user_agent"]=> string(114) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36" ["currency"]=> string(3) "USD" ["payment_status"]=> NULL ["payment_date"]=> NULL ["payment_amount"]=> NULL ["payment_method"]=> NULL ["transaction_id"]=> NULL ["is_fulfilled"]=> NULL ["created_by"]=> string(2) "10" ["transaction_type"]=> NULL ["status"]=> string(6) "active" [4]=> string(10) "2022-03-15" [5]=> string(8) "08:00 am" [12]=> string(2) "60" [9]=> string(7) "Ben Lin" [8]=> string(2) "it" [7]=> string(15) "1185 NYR Office" [10]=> string(34) "Room with Projector (Max 15 Seats)" [15]=> string(8) "09:00 am" ["is_approved"]=> string(1) "3" [2]=> string(0) "" ["workflow_current_status_timestamp"]=> bool(false) } [1]=> array(31) { ["id"]=> string(3) "828" ["form_id"]=> string(2) "18" ["post_id"]=> NULL ["date_created"]=> string(19) "2022-03-17 14:34:22" ["date_updated"]=> string(19) "2022-03-17 14:34:22" ["is_starred"]=> string(1) "0" ["is_read"]=> string(1) "0" ["ip"]=> string(15) "0" ["source_url"]=> string(61) "placeholder" ["user_agent"]=> string(114) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36" ["currency"]=> string(3) "USD" ["payment_status"]=> NULL ["payment_date"]=> NULL ["payment_amount"]=> NULL ["payment_method"]=> NULL ["transaction_id"]=> NULL ["is_fulfilled"]=> NULL ["created_by"]=> string(2) "10" ["transaction_type"]=> NULL ["status"]=> string(6) "active" [4]=> string(10) "2022-03-14" [5]=> string(8) "09:00 am" [12]=> string(2) "60" [9]=> string(7) "Ben Lin" [8]=> string(2) "it" [7]=> string(15) "1185 NYR Office" [10]=> string(34) "Room with Projector (Max 15 Seats)" [15]=> string(8) "10:00 am" ["is_approved"]=> string(1) "3" [2]=> string(0) "" ["workflow_current_status_timestamp"]=> bool(false) } [2]=> array(31) { ["id"]=> string(3) "827" ["form_id"]=> string(2) "18" ["post_id"]=> NULL ["date_created"]=> string(19) "2022-03-17 14:33:51" ["date_updated"]=> string(19) "2022-03-17 14:33:51" ["is_starred"]=> string(1) "0" ["is_read"]=> string(1) "0" ["ip"]=> string(15) "0" ["source_url"]=> string(61) "placeholder" ["user_agent"]=> string(114) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36" ["currency"]=> string(3) "USD" ["payment_status"]=> NULL ["payment_date"]=> NULL ["payment_amount"]=> NULL ["payment_method"]=> NULL ["transaction_id"]=> NULL ["is_fulfilled"]=> NULL ["created_by"]=> string(2) "10" ["transaction_type"]=> NULL ["status"]=> string(6) "active" [4]=> string(10) "2022-03-14" [5]=> string(8) "08:00 am" [12]=> string(2) "60" [9]=> string(7) "Ben Lin" [8]=> string(2) "it" [7]=> string(15) "1185 NYR Office" [10]=> string(34) "Room with Projector (Max 15 Seats)" [15]=> string(8) "09:00 am" ["is_approved"]=> string(1) "3" [2]=> string(0) "" ["workflow_current_status_timestamp"]=> bool(false) } [3]=> array(31) { ["id"]=> string(3) "826" ["form_id"]=> string(2) "18" ["post_id"]=> NULL ["date_created"]=> string(19) "2022-03-17 14:31:30" ["date_updated"]=> string(19) "2022-03-17 14:31:30" ["is_starred"]=> string(1) "0" ["is_read"]=> string(1) "0" ["ip"]=> string(15) "0" ["source_url"]=> string(61) "placeholder" ["user_agent"]=> string(114) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36" ["currency"]=> string(3) "USD" ["payment_status"]=> NULL ["payment_date"]=> NULL ["payment_amount"]=> NULL ["payment_method"]=> NULL ["transaction_id"]=> NULL ["is_fulfilled"]=> NULL ["created_by"]=> string(2) "10" ["transaction_type"]=> NULL ["status"]=> string(5) "trash" [4]=> string(10) "2022-03-14" [5]=> string(8) "11:00 am" [12]=> string(2) "60" [9]=> string(7) "Ben Lin" [8]=> string(2) "it" [7]=> string(15) "1185 NYR Office" [10]=> string(34) "Room with Projector (Max 15 Seats)" [15]=> string(8) "00:00 am" ["is_approved"]=> string(1) "3" [2]=> string(0) "" ["workflow_current_status_timestamp"]=> bool(false) } [4]=> array(31) { ["id"]=> string(3) "825" ["form_id"]=> string(2) "18" ["post_id"]=> NULL ["date_created"]=> string(19) "2022-03-17 14:29:32" ["date_updated"]=> string(19) "2022-03-17 14:29:32" ["is_starred"]=> string(1) "0" ["is_read"]=> string(1) "0" ["ip"]=> string(15) "0" ["source_url"]=> string(61) "placeholder" ["user_agent"]=> string(114) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36" ["currency"]=> string(3) "USD" ["payment_status"]=> NULL ["payment_date"]=> NULL ["payment_amount"]=> NULL ["payment_method"]=> NULL ["transaction_id"]=> NULL ["is_fulfilled"]=> NULL ["created_by"]=> string(2) "10" ["transaction_type"]=> NULL ["status"]=> string(5) "trash" [4]=> string(10) "2022-03-14" [5]=> string(8) "09:00 am" [12]=> string(2) "60" [9]=> string(7) "Ben Lin" [8]=> string(2) "it" [7]=> string(15) "1185 NYR Office" [10]=> string(34) "Room with Projector (Max 15 Seats)" [15]=> string(8) "10:00 pm" ["is_approved"]=> string(1) "3" [2]=> string(0) "" ["workflow_current_status_timestamp"]=> bool(false) } [5]=> array(31) { ["id"]=> string(3) "824" ["form_id"]=> string(2) "18" ["post_id"]=> NULL ["date_created"]=> string(19) "2022-03-17 14:27:33" ["date_updated"]=> string(19) "2022-03-17 14:27:33" ["is_starred"]=> string(1) "0" ["is_read"]=> string(1) "0" ["ip"]=> string(15) "0" ["source_url"]=> string(61) "placeholder" ["user_agent"]=> string(114) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36" ["currency"]=> string(3) "USD" ["payment_status"]=> NULL ["payment_date"]=> NULL ["payment_amount"]=> NULL ["payment_method"]=> NULL ["transaction_id"]=> NULL ["is_fulfilled"]=> NULL ["created_by"]=> string(2) "10" ["transaction_type"]=> NULL ["status"]=> string(5) "trash" [4]=> string(10) "2022-03-14" [5]=> string(8) "08:00 am" [12]=> string(2) "60" [9]=> string(7) "Ben Lin" [8]=> string(2) "it" [7]=> string(15) "1185 NYR Office" [10]=> string(34) "Room with Projector (Max 15 Seats)" [15]=> string(8) "09:00 pm" ["is_approved"]=> string(1) "3" [2]=> string(0) "" ["workflow_current_status_timestamp"]=> bool(false) } }
This is the dump when using:
var_dump(GFAPI::get_entries(18,$search_criteria['field_filters'][] = array( 'key' => '4', 'value' => $meeting_date )));
system
(system)
Closed
March 18, 2022, 3:26pm
3
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.