Embedding Custom Forms (For Dan)

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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
Photo of rocketc

rocketc

  • 494 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of rocketc

rocketc

  • 494 Points 250 badge 2x thumb
Got it working! rid: rid,
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,572 Points 20k badge 2x thumb
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"
}