Submit button not showing up for Multi Select update report

(8 posts) (2 voices)

Tags:

No tags yet.

  1. pac, Member

    Report 1 should have cid column selectable and pass cids to Report 2 and refresh Report 1 after update. But the Submit button is not showing up in Report 1. Is there something wrong that we do?

    Report 1


    CREATE PROCEDURE `sp_DBR_appt_test`()
    BEGIN select 'dbr.hidecolumn','aid','TID';
    select 'dbr.selectable','cid';
    select 'dbr.resultclass','Teams'; SELECT
    a.`cid` 'cid',
    a.aid,
    IF(
    a.`TM Name` IS NULL, 'Assign', a.`TM Name`
    ) as 'TM Name[vName]',
    a.`TM Id` as 'TID',
    if(T_Date IS NULL, 'New', 'Edit') 'Appointment',
    convert_tz(T_Date, '+00:00', '-07:00') as 'Date[sdate]:type=datetime',
    a.sugar_meeting_status as 'Status[Status]',
    a.`Company Name` 'Company',
    a.`Name`,
    a.`C Street` 'Contact Street',
    a.`C City` 'Contact City',
    a.`C State` 'Contact State',
    IF(b.Team IS NULL, '', b.Team) 'Reporting',
    a.`Title`,
    a.`Department`,
    a.`Reports To`,
    a.`Email Address`,
    a.`Work Phone`,
    a.`Street` 'Company Street',
    a.`City` 'Company City',
    a.`State` 'Company State',
    a.sugar_meeting_id
    FROM
    db2.sales_list a
    left join (
    select
    `Reports To`,
    count(cid) 'Team'
    from
    db2.sales_list
    where
    `Reports To` IS NOT NULL
    group by
    `Reports To`
    ) as b on b.`Reports To` = a.`Name`
    WHERE
    MATCH(a.Title, a.department) AGAINST (
    'manager director sales technical application -project -account -consult -consultant -exec -executive -specialist -architect -program -engineer -planning -marketing -channel -representative -representitive' IN BOOLEAN MODE
    )
    AND (
    a.`C State` IS NOT NULL
    AND a.`State` IS NOT NULL
    )
    limit
    10; select 'dbr.button','Submit';
    select 'dbr.report','sp_DBR_sales_appt_multi_update','dynamic_div[]','vcid=cid.Teams';
    SELECT 'dummy result set for the button';

    Report 2


    CREATE PROCEDURE sp_DBR_sales_appt_multi_update(vcid text)
    BEGIN
    Declare vuid varchar(36) Default uuid(); insert into global_gm_merged.meetings (id,name,date_entered,date_modified,modified_user_id,created_by,description,deleted,assigned_user_id,location,duration_hours,duration_minutes,date_start,parent_type,status,parent_id) values (vuid,'AT&T Road Show',now(),now(),vtmid,vtmid,'AT&T Road Show','0',vtmid,'','0','0',convert_tz(vstart,'-07:00','+00:00'),'Contacts',vcstatus,vcid); insert into db1.meetings_contacts (id,meeting_id,contact_id,accept_status,date_modified,deleted) values(uuid(),vuid,vcid,vcstatus,now(),0);
    insert into db1.meetings_users (id,meeting_id,user_id,required,accept_status,date_modified,deleted) values(uuid(),vuid,vtmid,'1',vcstatus,now(),0);
    update db2.sales_list set sugar_meeting_id=vuid,T_Date=convert_tz(vstart,'-07:00','+00:00'),sugar_meeting_status=vcstatus where find_in_set(cid,vcid);
    select 'dbr.refresh';
    END

  2. myDBR Team, Key Master

    Hi,
    use selectable.resultclass as a parameter to the selectable report.

    So instead of:

    select 'dbr.report','sp_DBR_sales_appt_multi_update','dynamic_div[]','vcid=cid.Teams';

    use
    select 'dbr.report','sp_DBR_sales_appt_multi_update','dynamic_div[]','vcid=selectable.Teams';

    Note also that the vcid-parameter in your sp_DBR_sales_appt_multi_update, contains a comma separated list of the selected ID's.
    --
    myDBR Team

  3. pac, Member

    select 'dbr.report','sp_DBR_sales_appt_multi_update','dynamic_div[]','vcid=selectable.Teams';

    Used the above code but the button doesn't show up.
    And also how to pass more than one variable with above resultclass method.

  4. myDBR Team, Key Master

    If the button does not show up, make sure that:

    • The procedure sp_DBR_sales_appt_multi_update is created
    • It is added as a report
    • User has permissions to the report

    And also how to pass more than one variable with above resultclass method.

    Not sure what you mean by this. What is it that you are trying to do?

    --
    myDBR Team

  5. pac, Member

    Thanks. After adding the stored procedure to a report, the button showed up.

    And also how to pass more than one variable with above resultclass method.

    CREATE PROCEDURE `sp_DBR_sales_appt_multi_update`(vcid text)
    Right now cid is the only variable being passed.

    If the multi update report looks for more than one variable like vtmid, meetingid, etc.. how to append them.

    CREATE PROCEDURE `sp_DBR_sales_appt_multi_update`(vcid text,vtmid varchar(36),meetingid varchar(36),vcstatus varchar(25),vstart date)

  6. myDBR Team, Key Master

    Where would those variables come from? What is the use case you have i.e. what is it that you are doing in your multiselect?

    You can pass constants to the multiselect as you can with any other linked report. The selectable parameter is the last parameter for the report.

    --
    myDBR Team

  7. pac, Member

    Where would those variables come from? What is the use case you have i.e. what is it that you are doing in your multiselect?

    A row consists of contact id (cid), sales manager id (tmid), meeting id if already exists(meetingid), meeting status (vcstatus). Like cid column, other variables are also from columns in the respective row.
    We like to get those parameters and create or update a meeting schedule for each set (cid,tmid,meetingid,status) in other tables (contacts, meetings, sales managers).

  8. myDBR Team, Key Master

    Hi,
    a multiselect option allows for you to select multiple options from the rows and pass it as a parameter to a report (multiple to one). You would use multiselect to select multiple options for one row, not multiple ones. The multiselect parameter would come from multiselect and other parameter would come from the resultset after the multiselect (where you have the placeholder "dummy result set for the button").

    Sounds like you are looking for other option than the multiselect as this is not how multiselect works. Mabye just a direct link at each row which would pass all the variables and you can then process them row by row.

    if you open a support ticket with more detailed explanation (mabye screenshots), we could help you with more suitable approach.
    --
    myDBR Team


Reply

You must log in to post.