Have a Parent and a Child Record (table has a relationship to itself). I want to click on Add Record and be directed to a specific form to complete the Child.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have a Messaging Table. Includes standard Messaging type fields including Record ID#, User Message, User ID, Date and Time Stamp, etc. I have created a relationship to this table from within the table to capture a response thread to main message. Lets call the main message the Parent, and the response the Child.

I have 2 forms in this table. The Main Form for the Parent (it includes an embedded table of the responses), and a second form entitled Response. Ideally this is linked to the Parent and only includes a response field and User ID.

When the relationship was created, the following code was provided:

URLRoot() & "db/" & [_DBID_MESSAGES] & "?a=API_GenAddRecordForm&_fid_15=" & URLEncode ([Record ID#])& "&z=" & Rurl()

When I click on the code, I am being directed to the Main Form. I'd like to be directed to the Response form. Once the response is completed and saved, I'd like to be redirected back to the Main form.

I have been beating around on this for a few hours and am coming up short. I'd like to wrap this table up and move on to my next task. I am out of horsepower and could use the help of the community on this one. I have given this one my best shot today.

Here is some pertinent field ID information:

  • Form ID of the Master Form: 2
  • Form ID of the Repsonse Form: 10
  • Messaging Table Key: Record ID#
  • Related Record Field ID: 15 [Related Record]

Appreciate any help!

Andy


 

Photo of Andrew

Andrew

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,332 Points 50k badge 2x thumb
Try this

URLRoot() & "db/" & [_DBID_MESSAGES] & "?a=API_GenAddRecordForm&dfid=10&_fid_15=" & URLEncode ([Record ID#])& "&z=" & Rurl()


The dfid means to use "Da Form ID number 10".
Photo of Andrew

Andrew

  • 0 Points
As usual Mark comes to the rescue! One of these days I may get to understand how all this is put together.
Photo of Andrew

Andrew

  • 0 Points
And I am not sure I'd recommend a table having a relationship to itself ... it gets pretty complicated.
Photo of Heather Bryant

Heather Bryant

  • 20 Points
Mark! You're a lifesaver! This just helped me greatly! One add-on question to this - I followed your above suggestion to direct to a specifc form; that worked great. How can I add another value to be set? For example, on the form there is a File Type text-multiple choice field. I'd like for when the form is opened for that value to be set to 'Safety Inquiry'. Is there a way to do this? THANKS!!