Forum Discussion

ChrisSwirtz3's avatar
ChrisSwirtz3
Qrew Member
3 years ago

Issues with pulling info from Parent to Child records

In my app I have an "Entities" table which is a parent table to a "Sub-Entities" table and lastly a "Spaces" table which is a child table to both the "Entities" and "Sub-Entities" tables. They are connected separately to the "Spaces" table so that either can create a new Space. I have both relationships pulling the same info, Entity or Sub-Entity name, contact names, addresses, etc. And when I create a new Space from the Entities table it pulls those fields into the Spaces table as it should, however when I create a new Space from the Sub-Entities table, none of the info pulls over and I cannot for the life of me figure out why it's not working for the Sub-Entities. The only thing I can figure is because the Sub-Entities table is a child table to the Entities table. Any insight as to why this might not be working?

------------------------------
Chris Swirtz
------------------------------
  • The button to create a new space from the SubEntities table needs to populate the field for Related Entity.  Can you post the code for that button?

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • ChrisSwirtz3's avatar
      ChrisSwirtz3
      Qrew Member
      This is the code I have been using both on the Entities table and the Sub-Entities table to create new Spaces.

      URLRoot() & "db/" & [_DBID_SPACES]

      & "?a=API_GenAddRecordForm"

      & "&_fid_60=" & URLEncode ([Record ID#])

      & "&_fid_12=" & URLEncode("New (Annual) Lease")

      & "&z=" & Rurl()

      This is the code for the "Add Spaces" button created from the relationship between the the Sub-Entities table and the Spaces table. 

      URLRoot() & "db/" & [_DBID_SPACES]

      & "?a=API_GenAddRecordForm&_fid_1318="

      & URLEncode ([Record ID#])

      & "&z=" & Rurl()

      Obviously my code has a couple extra functions added to it. Looks like the "fid_1318" section is the only other difference. But when I tried this button, the Sub-Entity did fill in the box like I wanted it to.



      ------------------------------
      Chris Swirtz
      ------------------------------
      • ChrisSwirtz3's avatar
        ChrisSwirtz3
        Qrew Member
        I got this figured out, thanks!

        ------------------------------
        Chris Swirtz
        ------------------------------