Forum Discussion
Laura_Thacker
9 years agoQrew Commander
When you go into the CopyMasterDetail "wizard" it will ask you how you want to set it up. You can either set it up so that you "copy" the record you're on and all the children from its relationships or you can set it so that it will copy a "specific" parent's child records.
In your case, I imagine that you will want to "copy" your Invoice from one month to the next with all the children in tow; and then just modify the Invoice details (like the Invoice # for example).
When you finish setting this up, QuickBase will create a button for you in your table (you get to name it as part of the setup). You then put this on your Invoices so you can copy them when you want to. If you choose "this" setup; I recommend also creating a dedicate text-field in your Invoices table called [Copy]. So when the feature copies your invoice and line items; that the "Copy of" text can go directly into this field instead of a valid-data field which it would otherwise do.
If you then need some kind of "dynamic" Invoice Numbering method; you will need this to work from some kind of formula which probably would reference/include the Date somehow and the Record ID# of the Invoice that gets created.
This is actually the perfect native solution for your needs; if you need help working through it in your App, I'm sure that Matthew, Mark or myself can help - I see that you were having trouble finding your Invoices table in the drop down.
In your case, I imagine that you will want to "copy" your Invoice from one month to the next with all the children in tow; and then just modify the Invoice details (like the Invoice # for example).
When you finish setting this up, QuickBase will create a button for you in your table (you get to name it as part of the setup). You then put this on your Invoices so you can copy them when you want to. If you choose "this" setup; I recommend also creating a dedicate text-field in your Invoices table called [Copy]. So when the feature copies your invoice and line items; that the "Copy of" text can go directly into this field instead of a valid-data field which it would otherwise do.
If you then need some kind of "dynamic" Invoice Numbering method; you will need this to work from some kind of formula which probably would reference/include the Date somehow and the Record ID# of the Invoice that gets created.
This is actually the perfect native solution for your needs; if you need help working through it in your App, I'm sure that Matthew, Mark or myself can help - I see that you were having trouble finding your Invoices table in the drop down.
- SarahWallis9 years agoQrew Trainee
Thank you. That might all work if I can find Invoices in this list.
It looks like your screen shot is different than mine. How did you navigate to that view? I navigated via: Home -> Settings -> App management. -> Copy master & detail records. Attached is what I see, which is different than what you've attached. Any ideas?
- QuickBaseCoachD9 years agoQrew CaptainIt seems bizarre that your invoices table is not listed as a choice. So you are saying that is not a choice on that drop down list.
There is a way to make the same button using the API but I don't understand why invoices is not a choice for you - SarahWallis9 years agoQrew TraineeCorrect - it is not in that list. Only 13 of my 16 tables are displayed as options. Could this be b/c Invoices are children of Invoice Header (which is listed).
- QuickBaseCoachD9 years agoQrew CaptainIs there at least 1 field on the invoice table which is a pure text data entry field (not multiple choice)? It needs at least 1 test data entry field to be chosen.
- SarahWallis9 years agoQrew Trainee
Yes, it has "Invoice #" as a Text. (It has more, but the others are from relationships.)
- QuickBaseCoachD9 years agoQrew CaptainYou can try this format to make your own button using the API method.
var text CopyMasterDetail = URLRoot() & "db/" & Dbid() & "?a=API_CopyMasterDetail&destrid=0&sourcerid=" & ToText([Record ID#])
& "&apptoken=" // if you have app tokens enable, put it in here
& "©fid=6" // replace the 6 insert the fid for the invoice# field here
& "&relfids=7"; // replace the 7 with the fid for the report link field on the relationships between invoice and lines
// typically it would be called Invoice Lines or Perhaps Lines.
// remember to end your formula variable with a semicolon.
var Text ReportOfInvoicesCreatedToday =
URLRoot() & "db/" & Dbid() & "?a=q&qid=5"; // make a report of Invoices created today by the current user. ie two filters, and substitute in the report ID for the 5.
$CopyMasterDetail
& "&rdr=" & URLEncode($ReportOfInvoicesCreatedToday)