I've been thinking about how to best approach this and I'm stumped as to how to best go about it.
I want to add a custom field to a profile that is rendered on the Contact Summary page. I would like to fill it dynamically with the value of the individual's earliest Member Since value.
NOTE: I say the earliest Member Since value because a bug in Civi has changed all Member Since values of currently active membership records to the date of the start of that membership record when they are renewed which ignores the concept that the individual may have had an earlier membership of a different type. The solution is to loop through all memberships and grab the oldest value to populate the custom field with it.
I'm well versed in building custom extensions and working in custom code. This is for a Drupal 7 / CiviCRM site. Any ideas or direction?