Parent not getting updated with Child Record ID

  • 0
  • 1
  • Question
  • Updated 6 years ago
  • Answered
I have a formula URL field to add record to the child table (and bring over data from the parent).

It is working fine, except the Parent is not getting updated with the Child Record ID#.

Any suggestions? Thanks!

URLRoot() & "db/" & [_DBID_CLAIMS]& "?act=API_GenAddRecordForm&_fid_77=" & URLEncode([Related Client]) & "&_fid_78=" & URLEncode([Client Name]) & "&_fid_79=" & URLEncode([Related Location]) & "&_fid_86=" & URLEncode([Record ID#]) & "&z=" & Rurl()

Robert

Photo of Robert

Robert

  • 210 Points 100 badge 2x thumb

Posted 6 years ago

  • 0
  • 1
Photo of Mark_Shnier

Mark_Shnier

  • 590 Points 500 badge 2x thumb
Something looks confused. I assume that One Client has many Claims and they are related though the field called [Related Client]. I asusme that this button is located n the Parent Client record.

Normally you would use

URLRoot() & "db/" & [_DBID_CLAIMS]& "?act=API_GenAddRecordForm&_fid_77=" & URLEncode([Record ID#) // the record id of the parent is what goes into the related client field on the child claim record
& "&_fid_78=" & URLEncode([Client Name]) // why do you need this at all - the Client name should be done though a lookup field down form the Parent.
& "&_fid_79=" & URLEncode([Related Location])
& "&_fid_86=" & URLEncode([Record ID#]) // I am not sure what fid 86 is.

& "&z=" & Rurl()

We can try to sort this out over the forum or i can have a look at your app if you like.
Photo of Robert

Robert

  • 210 Points 100 badge 2x thumb
Hi Mark!  Thanks for your response.  There are 4 tables involved - CLIENTS, LOCATIONS, AUDITS and CLAIMS.  This URL formula creates a new record in the CLAIMS table from the AUDITS table.  There are relationships between CLIENTS >> LOCATIONS, CLIENTS >> AUDITS, CLIENTS >> CLAIMS, LOCATIONS >> AUDITS, LOCATIONS >> CLAIMS, AUDITS >> CLAIMS.

In this formula we are adding a record to the CLAIMS table (child) from the AUDITS table (parent) and the AUDITS table is not updated with the Record ID# from the CLAIMS table (child).

If I don't insert the [Client Name] into field 78 of the CLAIMS table when creating the new record it does not update even though it is a lookup field from the CLIENT table.  Does the fact that we are adding the record from the AUDITS table make a difference.
fid 86 is a field in the CLAIMS table called Related Audit.

Any additional thoughts would be appreciated.  Thanks!  Robert
Photo of Mark_Shnier

Mark_Shnier

  • 590 Points 500 badge 2x thumb
If One Audit has Many Claims, then the field Related Audit (field ID # 86) in the Claims Table needs to be populated with the [Record ID#] of the Audit record.  So that look correct in your formula.  When you say that the Parent record is not getting updated with the child record id, its not supposed to get updated with the child record ID as it could have 100 children - where would all those record ID's go?  Maybe you are saying that the records are not getting properly linked up so the parent does not have an embedded report which shows its children.

If you like you can contact me via the information in my profile and invite me to the app or a copy of the app and let me have a look as Admin Role.