Populate Dude's Custom Field

Is there a way to populate device’s Custom Field with the device’s DNS name?