--- title: "copydowndiscrete" slug: "copydowndiscrete" updated: 2026-06-08T17:08:43Z published: 2026-06-08T17:08:43Z canonical: "docs.datajet.app/copydowndiscrete" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # copydowndiscrete Copies a field from the primary table to the foreign table | Key | Value(s) | Description | | --- | --- | --- | | method | "BuildBakedField" | | | function | "copydowndiscrete" | Copies a field from the primary table to the foreign table | | targetTable | "ForeignTableName" | Name of table on which to create field. Must be the "Many" side of a "One to Many" join. | | name | "TargetFieldName" | Name of field to create | | dataset{} | {} | Dataset selecting which records to copy | | overwrite | true/false | | | p1 | "SourceFieldName" | Source field name | | p2 | "SourceTableName" | Source table name | ```json { "method": "BuildBakedField", "function": "copydowndiscrete", "targetTable": "%FTABLE%", "name": "%RANKNAME%", "overwrite": false, "p1": "%RANKNAME%", "p2": "constructor%DSTAMP%", "project": "SmallTrans" } ``` ## Related - [CopyDownFromTemplate](/copydownfromtemplate.md) - [CopyUp](/copyup.md) - [CopyUpFromTemplate](/copyupfromtemplate.md) - [Copy Up (F->P)](/copy-up.md)