Forum Discussion
MarkShnier__You
Qrew Legend
5 years agoI'm not sure I fully understand your question but in the target table where you are adding records if you make a relationship so that table is also related to the same parent as your source table then if you populate the field for [Related Parent] then you can have any look up fields from that Related Parent] come down to the newly created copied record as lookup fields.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
- ChrisFaye15 years agoQrew CadetThanks, Mark!
The trick here is we're using the button to create a carbon copy of the information rather than relate the new record because it needs to be frozen in time.
Sorry I misspoke on the add vs. edit record part.
Here's a bit of the current button -
var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_1784=" & URLEncode(UserToName(User()))
& "&_fid_1783=true"
& "&_fid_236=" & URLEncode("Application in Process")
& "&_fid_1618=" & URLEncode([Property - Payment Structure])
& "&_fid_1013=" & URLEncode([Property - Accounting Structure])
& "&_fid_974=" & ([Property - Invoice Commission Rate]*100)
Anything with "Property - " is a look-up field in the local table. It would be super-efficient if there was a way to avoid having the create the redundant look-up fields in the local table and instead have the button reference the fields in the related record on the parent table.
In written out terms -
var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_1784=" & URLEncode(UserToName(User()))
& "&_fid_1783=true"
& "&_fid_236=" & URLEncode("Application in Process")
& "&_fid_1618=" & <<<Look to Related Record in Property Table>>> URLEncode([Payment Structure])
& "&_fid_1013=" & <<<Look to Related Record in Property Table>>> URLEncode([Accounting Structure])
& "&_fid_974=" & <<<Look to Related Record in Property Table>>> ([Invoice Commission Rate]*100)
------------------------------
Chris
------------------------------- MarkShnier__You5 years ago
Qrew Legend
Let's back up a step here.
That's the whole reason you were doing this because you want to freeze to look up fields so they do not change?
If so, there is native functionality for this using snapshot fields.
https://help.quickbase.com/user-assistance/setting_up_snapshot_fields.html
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- ChrisFaye15 years agoQrew CadetThanks, Mark!
Unfortunately, the snapshot option only triggers when initiating the snapshot option in the field settings. The requirement of this process is that the user needs to be able to click a button (update something) that triggers a the snapshot and then those snapshots needs to be editable for possible manual future corrections.
Basically this is looking at the Property table's *current* rates at the time the rental application is placed for each individual rental application and freezing those values in an manually editable way.
It sounds like duplicating the look-up fields in the child table and doing the copy values locally in the button currently still the most efficient way. 🤷♂️
------------------------------
Chris
------------------------------