Discussions

Expand all | Collapse all

Problem with one of Dan Diebolt's pasties for embedding a bar graph in a form

  • 1.  Problem with one of Dan Diebolt's pasties for embedding a bar graph in a form

    Posted 04-19-2017 21:30
    So I am not sure where I am wondering off the path, but I can't follow Dan's Pastie #492
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&r=rn&rl=czr

    I created the newest version of IOL but in following these directions I had to make a change based on what I saw in the code-see below.

    [iol] value is:

    <img qbu='module' src='/i/clear2x2.gif' onload="javascript:if(typeof QBU=='undefined'){QBU={};$.getScript(gReqAppDBID+'?a=dbpage&pagename=

    [/iol] value is:

    module.js&rand='+new Date().getTime())};">

    I created a Chart field of formula-text type:

    [iol] & "module.js" & [/iol]
    &
    "<div class='QBU_Chart'" &
    "  data-rid='" & [Record ID#] & "'" &
    "></div>"

    I copy & pasted the code from the site, changing the variables for dbid and dbidtable1 to reference my tables, plus created an app token and changed that variable.

    In my table I created columns with the same fruit headings and populated them with numbers. Below is a shot of what I get back when I look at the records:

    I know it's blurry, but in the charts field I just get the formula back.

    Any help is greatly appreciated!


  • 2.  RE: Problem with one of Dan Diebolt's pasties for embedding a bar graph in a form

    Posted 04-19-2017 22:22
    I am in a meeting on a tablet but I see two issues:


    1) the IOL field should have the option "some HTML allowed" checked


    2) your definition for [/iol] should not include the text "module.js".


  • 3.  RE: Problem with one of Dan Diebolt's pasties for embedding a bar graph in a form

    Posted 04-23-2017 17:04
    Sorry to take so long to reply back!

    I know your IOL document says make sure to select "some HTML allowed" so of course I have to make sure to NOT select that :)

    Anyway, that did make the plot show up with 4 lines, yay! But the lines do not actually extend for any length nor do the have a number count.

    Thoughts?


  • 4.  RE: Problem with one of Dan Diebolt's pasties for embedding a bar graph in a form

    Posted 04-26-2017 17:12
    I finally discovered the problem and I feel stupid for not seeing this part for what it is.

    In the code below, I didn't know what the 6.7.8.9 values were for.
     
    $.when(
        $.get(dbidTable1, {
          act: "API_DoQuery",
          query: "{3.EX." + kRid + "}",
          clist: "6.7.8.9"
    After reading https://community.quickbase.com/quickbase/topics/embed-a-bar-graph-on-on-a-form-with-information-fro... I saw this referencing the Field ID number.