dbr.selectable issue

(2 posts) (2 voices)

Tags:

No tags yet.

  1. Rbert, Member

    Hello, I have a report that contains this:


    select
    'dbr.report',
    'sp_DBR_settlements_bulk_assign_periodic_fees',
    'inSellerIds=selectable.seller_ids',
    'inFeeIds=selectable.fee_ids'; select 'dbr.button', 'Assign fees';
    select 'dummy'; select 'dbr.selectable', 'id';
    select 'dbr.resultclass', 'fee_ids'; select
    fees.id,
    fees.name,
    fees.description,
    fees.amount,
    p.name as period
    from
    AhaInfoCopy.settlements_periodic_fees fees
    join AhaInfoCopy.settlements_periods p
    on fees.period_id = p.id; select 'dbr.column.filter', 'merchant_name', 'text';
    select 'dbr.column.filter', 'seller_name', 'text';
    select 'dbr.column.filter', 'seller_id', 'text';
    select 'dbr.column.filter', 'merchant_id', 'text';
    select 'dbr.column.filter', 'active', 'select'; select 'dbr.selectable', 'id';
    select 'dbr.resultclass', 'seller_ids'; select
    seller.seller_id as "id",
    seller.merchant_id,
    seller.merchant_name,
    seller.seller_id,
    seller.seller_name,
    if(seller.status = 1, 'yes', 'no') as active from
    tmp_all_sellers seller;

    Then sp_DBR_settlements_bulk_assign_periodic_fees is like


    DROP PROCEDURE IF EXISTS sp_DBR_settlements_bulk_assign_periodic_fees
    $$
    CREATE PROCEDURE `sp_DBR_settlements_bulk_assign_periodic_fees`(
    inStartDate date,
    inSellerIds text,
    inFeeIds text
    )
    BEGIN select inStartDate, inSellerIds, inFeeIds; -- do something END
    $$

    The issue is as follows. If I leave this as is, and press the "Assign fees" button, with some rows selected, nothing happens. But if I add "new_window" to the button "dbr.report", then the report runs, but the values passed in for "inSellerIds" and "inFeeIds" are "[selectable.seller_ids]", and "[selectable.fee_ids]". That is, I see this table:

    inStartDate inSellerIds inFeeIds
    2023-07-01 [selectable.seller_ids] [selectable.fee_ids]

    What's going on?

  2. myDBR Team, Key Master

    Unfortunately dbr.selectable does not support multiple selectable result sets. You can do the same with one and have another selection done as a checkbox parameter to the sp_DBR_settlements_bulk_assign_periodic_fees.

    --
    myDBR Team


Reply

You must log in to post.