Create a node programatically and set its CCK field values
For nodereference fields you have to use "nid" instead of "value".

//123 is the nid of the node you want to reference 
$node-&gt;field_application_discipline_id[0]['nid'] = 123;


The best way to discover what variable to use is to install Devel module and view the devel tab next to the view/edit tab on the node page.