Youâre right I canât get it to work either with more than one condition.
This works:
'displayParams' => array(
'initial_filter' => '&account_name_advanced="+encodeURIComponent(this.form.name.value)+"',
'field_to_name_array' => array(
'name' => 'key_contact_c', // Contact name field
'id' => 'key_contact_id_c', // Contact ID field
),
),
I can filter by contacts of the account but if I try to add a second filter, I just canât get the syntax right. If I edit the URL of the popup I can add the condition but I canât seem to get the syntax right in the initial filter. Also, I can only get equal to a value to work, ânot equalâ I canât get to work any way I try.
Sorry, youâre going to have to try to write JS if you canât find the right syntax for the second condition.
(I have a second field non_active_c which Iâm filter by equal to 0, I canât get it ânot equalâ to 1)
/index.php?module=Contacts&action=Popup&query=true&account_name_advanced=24%2F7%20Couriers&mode=single&create=true&field_to_name=name&non_active_c_advanced=0
I can also get this to work, just not both at the same time:
'displayParams' => array(
'initial_filter' => '&non_active_c_advanced=1',
'field_to_name_array' => array(
'name' => 'key_contact_c', // Contact name field
'id' => 'key_contact_id_c', // Contact ID field
),
),
After doing some more research, its not possible to pass a ânot equal toâ to the URL. The != only returns a true or false , not an array of values that do not equal the specified value.
I can also get this URL to work in the popup, but canât seem to get multiple conditions to work in the initial filter:
/index.php?module=Contacts&action=Popup&query=true&account_name_advanced=24%2F7%20Couriers&non_active_c_advanced=1