def get_initial_field_value(value, dtype):
    """Get caproto pvproperty value from "initial(value)" portion of dbd file"""
    if isinstance(value, int) and dtype in ('CHAR', 'STRING'):
        return f'chr({value})'
    if dtype in ('ENUM',):
        if value == 65535:
            return 0
        if value == 'UDF':
            value = 'NO_ALARM'
    return repr(value)
