Forum Discussion

NenadIlic1's avatar
NenadIlic1
Qrew Member
8 years ago

Is there a way of using number from TOT (total) column in a formula (from relationship table)?

Is there a way of using TOT (total) column in a formula? I have one field that shows a specific number, and have created a relationship with another table (that in this case shows number of delays). In that delay table, bellow I see a number in TOT column, but I don't know how to use that number in a function.
  • This (Tot) values are not available to use in Formulas fields, they only exists on the report. But if you describe your tables and relationships and what you are trying to do, there still may be a way to get there.
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    (My Hunch)

    If your Child table is called 'Delays' I'm going to assume your parent table is something like "Projects".

    To get that total value that appears in the embedded delay report, usable in a formula, you will need to make a summary field.

    In the table settings, find the relationship between the project and the delays
    >
    Click "Create Summary"
    >
    Select "Total" and the field (i.e. Duration)
    >
    Create and name as you'd like

    Then you should be able to use wherever you'd like.
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    If I wanted to use that total to populate into a badge on a rich text page, where would I retrieve that formula? I assume I would use a query, but I want to know how I can pull it without the grid box around it. I just need the number.
  • You can extract any content from any QuickBase page and insert it anywhere in a code page with this technique.

    Here is a summary report where a total of 631 is displayed:




    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=q&qid=89

    If you create a RichText page and enter HTML editing mode you can get the total to appear with a short bit of code:


    Here is the result:

    mypage.html
    https://haversineconsulting.quickbase.com/db/bgcwm2m3z?a=dbpage&pagename=mypage.html


    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=659

    Notes:

    (1) See $.load() for details:

    http://api.jquery.com/load/
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    Thanks, Dan. The total was pulled in, but when I created a new record, it did not update the total. What am I missing?  
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    I take that back... it's updating the number in the code, but I'm trying to embed it in a badge, and that's the number that isn't updating.
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    Nope... false alarm. What part of the code do I embed into the badge?
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    Ok, I don't mean to toy with your emotions, but I have it now! This is going to come in very handy... thanks again!