Can a Yes/No toggle also open an inline report?

(4 posts) (2 voices)
  1. cris, Member

    I have a column in my report similar to the yes/no editable example except that it cycles through 3 values, say 1, 2, and 3. I also have an inline report that I can open/close with a separate column. Is there a way to have the inline report display automatically every time the user clicks on the yes/no toggle column has a value of 3 and close every time the editable column does not have a value of 3? I realize I can do this with a separate column, but just wondering if there is a way to tie it to the yes/no toggle column?

    Thanks,
    Cris

    Posted 2 months ago #
  2. myDBR Team, Key Master

    Yes you can.

    First of all, the inline toggle column needs to be there to actually make the inline action to happen. If you do not want to show the column with the toggle action, you can hide it.

    To make the inline toggle to happen when user clicks another cell, use JavaScript to click the inline toggle link:

    select 'dbr.javascript', concat("$(mydbr_selected_cell).parent().find('.toggle a').click();");

    where 'toggle' would be a CSS class added to the inline toggle column.

    --
    myDBR Team

    Posted 2 months ago #
  3. cris, Member

    Thank you. This pointed me in the right direction. I have a related question.

    Since the yes/no toggle setup does NOT utilize 'dbr.editable', there is no option for a callback, right? If I want to change other values in the inline report and in the parent report based on the yes/no toggle, how can I do that?

    I am trying to use the 'callbefore' function in the linked report that handles the yes/no logic, and am having some success, but is there a better way?

    Since the report that handles the yes/no logic is embedded in a hidden div, can it still access the calling report using javascript? I haven't seemed to be able to make that work.

    I appreciate the help and support.

    Cris

    Posted 2 months ago #
  4. myDBR Team, Key Master

    The JavaScript in embedded in a hidden div is in the main report so you can do whatever you want with JavaScript there (including change other values in other cells).

    See demo.

    The demo uses JavaScript to change another column's value by finding the cell via CSS class.

    --
    myDBR Team

    Posted 2 months ago #

Reply

You must log in to post.