I used Drupal 7 computed fields to calculate weight loss. This is what I current have. Which works in a sense but only where the user inputs their initial weight and subtracts their current weight to track the total weight loss at the time of the input. But I need it to reference their initial weight from their user profile so that they only have to enter their current weight. One step process versus having to always enter the data that already exists. How can I achieve this?
Current Code which works great but two fields have to be filled in. Needs to reference field in user profile.
$entity_field['value'] = ($entity->field_iweight['und']['value']) - ($entity->field_current_weight_['und']['value']);