I should have mentioned that on the second example, $fieldValue is being defined by a $_GET statement. If I take the $_GET statement out of the foreach loop, it does not retrieve the value:
$custom_field_keys = get_post_custom_keys();
function myFields()
{
return $fieldValue;
}
foreach ( $custom_field_keys as $key => $keyName )
{
//Bunch of other stuff
$fieldValue = $_GET["$keyName"];
add_shortcode((string)$keyName, 'myFields');
}