Is there a way to create a copy button that will copy a child record and several fields and still relate to the Parent table?

  • 0
  • 2
  • Question
  • Updated 10 months ago
  • Answered
Is there a way to create a copy button that will copy a child record and several fields and still relate to the Parent table? For instance i create an invoice based off a cost summary(parent table) now when i create the invoice it is created in a invoice table (child table)  related by record id from parent table (Cost Summary), i then want to add a copy button on the invoice that will create an almost identical copy and still relate to the Parent Table. Does this make sense and is it possible? i used this formula just to see if it will create a copy and not copy fields just the record id but it does not seem to be pulling over the ID it brings up a new invoice but does not show record id. URLRoot()&"db/(DB I know this)=GenCopyRecord&rid="&[Record ID#] . 
Photo of Jeffery Wong

Jeffery Wong

  • 130 Points 100 badge 2x thumb
  • Frustrated

Posted 10 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Does your actual formula include this

?a=GenCopyRecord&rid=49663
Photo of Jeffery Wong

Jeffery Wong

  • 130 Points 100 badge 2x thumb
everything but the number you have there I thought that was just the [Record ID#] which would copy the field which would include the record number.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Sorry, I did not mean to include the [Record ID#] 

I think that the problem is where the related parent field is set to read only on the form which is annoying that it does not populate.

There are other option if you are unwilling to make that field be read only.  One way might one to have a form rule to say,
when related parent is not blank, then make read only.  Then the field would not be read only until it gets populated.



 
Photo of Jeffery Wong

Jeffery Wong

  • 130 Points 100 badge 2x thumb
That is definitely an option and i have no issues in doing that.
Photo of Jeffery Wong

Jeffery Wong

  • 130 Points 100 badge 2x thumb
how would i make it not read only at the risk of sounding like a true noob? 
Photo of Jeffery Wong

Jeffery Wong

  • 130 Points 100 badge 2x thumb
my users have modify permissions to related record in the relationship?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
I made the assumption that on the record you are adding, that you had set the field for Related Parent to be read only on the form properties on the form.

That is my current assumption as to why the button is not populating that field.
Photo of Jeffery Wong

Jeffery Wong

  • 130 Points 100 badge 2x thumb
I figured out a way to create a copy and have it use the related record i use the create copy function under the more menu in the top right corner and in the table relationship under related record i choose to copy this value to copy of invoice. it copies a little more then needed however can easily be corrected by end user. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
OK, thx for letting me know.