Forum Discussion

BradElmore's avatar
BradElmore
Qrew Assistant Captain
8 years ago

Embedding Custom Forms (For Dan)

Question for Dan.

Dan,

I'm trying to implement a subdataForm -- similar to your Subdatasheet below.....I'm getting stuck when trying to inject the rid -- see below.  

   $.get(dbidTasks, {act: "API_GetRecordAsHTML",
        rid: (What goes here)
        dfid: "10"

The code below actually works....if I wanted to only see where the recordID=1 ---

Question: what does the code looks like to auto add the rid ---  Thanks

   $.get(dbidTasks, {act: "API_GetRecordAsHTML",
        rid: "1",
        dfid: "10"

Dan's Subdatasheet form

Very quickly implemented, here is a demo a Subdatasheet (terminology from Access feature) where you can click on the +/- button and show/hide the related child records:

Subdatasheet ~ List All Report (click on +/- sign in first data column to show/hide child records)
https://haversineconsulting.quickbase.com/db/bmnf7nrvf?a=td

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

2 Replies

  • Or using ES6 property shorthand you could just write this:

    let rid = 42;
    let obj = {
      act: "API_GetRecordAsHTML",
      rid,
      dfid: "10"
    }
    console.log(JSON.stringify(obj, null, "  "))
    {
      "act": "API_GetRecordAsHTML",
      "rid": 42,
      "dfid": "10"
    }