Hi @jmb
Lets start with the above filter I linked you to. This filter will demonstrate ho you can get the post_id and $value.
You can run a debug script within the function like so to test the value before saving it
echo '<pre>';
print_r( $value );
echo '</pre>';
die;
Thanks
E