1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

List Email Plugin - Address Book

Discussion in 'Community' started by jo-ka, Nov 6, 2018.

  1. jo-ka

    jo-ka Member

    Level: Community
    Hello.

    I'm trying to set a list email plugin, where I would use an Address Book to populate the Get email address from field.

    The list (crm_history) where I want to set the pulgin have a field called CustomerKeyId. The list I want to use as Address Book also have a field with the same name.

    I would like to "filter" the records from the Address Book list where the CustomerKeyId is the same.

    I've tried to set the WHERE clause as the image shows, but with no avail.

    Is there a way to accomplish this?

    Thanks in advance.

    upload_2018-11-6_10-1-13.png
     
  2. jo-ka

    jo-ka Member

    Level: Community
    Friendly bump
     
  3. troester

    troester Well-Known Member Staff Member

    Level: Community
    Do you get an error or is it showing all adresses or none?
    Did you try ...CustomerId_raw} ?
     
  4. jo-ka

    jo-ka Member

    Level: Community
    If I force a customer ID, like 80..

    upload_2018-11-8_12-11-5.png
    it works:

    upload_2018-11-8_12-12-9.png

    If I use the placeholder:

    upload_2018-11-8_12-13-56.png

    It gets infinite loop.
    upload_2018-11-8_12-14-39.png

    This placeholder is coming from the list where the email plugin is applied to.

    Any clue?
     
  5. troester

    troester Well-Known Member Staff Member

    Level: Community
    Check in the browser console and network tab.
    I assume the network response is showing some error or warning, so breaking the expected JSON response.
     
  6. jo-ka

    jo-ka Member

    Level: Community
    I think this is what we're looking for:

    upload_2018-11-8_14-37-8.png

    upload_2018-11-8_14-37-25.png

    I really can't understand!
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    Try
    check "Preserve log" in the network tab so it's not clearing old entries on page load
    in the code try
    {thistable}.CustomerKeyId = ...
    (maybe it's a "ambigious column" MySQL error)
     
  8. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Also quote the placeholder.

    If it's either not numeric or empty, not being quoted with throw a MySQL error.

    -- hugh
     
  9. jo-ka

    jo-ka Member

    Level: Community
    Hello. I've tried this:

    CustomerKeyId = 80 -> worked
    CustomerKeyId = '80' -> worked

    {thistable}.`CustomerKeyId` = '80' -> failed
    {thistable}.`CustomerKeyId` = 80 -> failed
    {thistable}.CustomerKeyId = '80' -> failed
    {thistable}.CustomerKeyId = 80 -> failed
    {thistable}.CustomerKeyId = '{crm_history___CustomerKeyId}' -> failed
    {thistable}.CustomerKeyId = '{crm_history___CustomerKeyId_raw}' -> failed
    {thistable}.`CustomerKeyId` = '{crm_history___CustomerKeyId}' -> failed
    {thistable}.`CustomerKeyId` = '{crm_history___CustomerKeyId_raw}' -> failed


    If I have this:
    CustomerKeyId = '{crm_history___CustomerKeyId}' or
    CustomerKeyId = '{crm_history___CustomerKeyId_raw}' or
    `CustomerKeyId` = '{crm_history___CustomerKeyId}' or
    `CustomerKeyId` = '{crm_history___CustomerKeyId_raw}' or
    or this:
    CustomerKeyId = '{customerscontacts___CustomerKeyId}' ( this is in case I've swapped the lists...)

    The result is this, the box is not populated...

    upload_2018-11-9_7-4-8.png

    I've also checked if there are any customers records on the list, and there are.

    Another question is. This are Fabrik lists linked to existing CRM application tables, ie, It's not "pure" Fabrik lists.

    I'm without options now.

    Do you have any other idea? Maybe I can give you access to the site...

    BR
     

    Attached Files:

  10. troester

    troester Well-Known Member Staff Member

    Level: Community
    Which exact Joomla and Fabrik are you running?
    Do you have Joomla's error reporting set to max?
     
  11. jo-ka

    jo-ka Member

    Level: Community
    I'm using Joomla and Fabrik 3.9.
    I've set the error level to Max or Development, and there's no errors.

    With this:
    upload_2018-11-9_16-33-50.png

    I just get this:

    upload_2018-11-9_16-34-20.png

    With this:
    upload_2018-11-9_16-35-36.png

    I just get this:

    upload_2018-11-9_16-35-14.png
     
  12. jo-ka

    jo-ka Member

    Level: Community
    friendly bump...
     
  13. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    If this is the same site as the one with the ACL issue, I could look at it at the same time, as per my reply on the other thread.

    -- hugh
     
  14. jo-ka

    jo-ka Member

    Level: Community
    Yes, it's for the same project.
    I've questioned you about the values on the other topic.

    BR
     

Share This Page