Connected parameter multiselect not working

(5 posts) (2 voices)

Tags:

No tags yet.

  1. rbecker, Member

    Sorry for blowing up the forum these last few days. Hopefully after this I should be set for a while. I have a few reports where I would like the user to select whether they want to run this report by List or by Campaign, but I can't get the multi-select to work after they select an option. The first parameter is a very simple radio button which uses the code select 1, 'Lists' union select 0, 'Campaigns'. This is properly setting the value as either 1 or 0 and I have confirmed this by having it output on the report as the only parameter. After that I have a select list with the multiselect box checked. That parameter calls a procedure which is as follows:

    DROP PROCEDURE IF EXISTS sp_ADBR_ListsCampaignsMulti
    $$
    CREATE PROCEDURE `sp_ADBR_ListsCampaignsMulti`(ListsOrCampaigns tinyint, userInput varchar(255))
    BEGIN if (ListsOrCampaigns = '1') then select list_id, concat(list_id, " - ", list_name) from asterisk.vicidial_lists where list_id like concat('%', userInput, '%') order by list_id limit 40;
    else select campaign_id, concat(campaign_id, " - ", campaign_name) from asterisk.vicidial_campaigns where campaign_id like concat('%', userInput, '%') order by campaign_id limit 40;
    end if; END
    $$

    Whenever I try to run it, I get a message stating "The results could not be loaded". This same query is working fine when it is not a connected parameter and exists on its own:

    DROP PROCEDURE IF EXISTS sp_ADBR_SelectLists
    $$
    CREATE PROCEDURE `sp_ADBR_SelectLists`(inLists varchar(255))
    BEGIN select list_id, concat(list_id, " - ", list_name)
    from asterisk.vicidial_lists
    where list_id like concat('%', inLists, '%')
    order by list_id limit 40; END
    $$

    Any help would be appreciated. Thanks.

  2. myDBR Team, Key Master

    You can run the automatic updater to get the latest build. The newest build supports connected parameters with multiselect parameter.

    --
    myDBR Team

  3. rbecker, Member

    Thanks for this. It is now working for the default value of Lists, but trying to use it for Campaigns still returns the error the results could not be loaded. I have tried using the "No selected radiobutton" option and the same thing happens.

  4. myDBR Team, Key Master

    Could you try to run the updater again.

    --
    myDBR Team

  5. rbecker, Member

    This appears to be working properly now. Thanks again!


Reply

You must log in to post.