func (r *Record) GetCustomFieldValueByType(fieldType string) string {
	if fieldType == "" {
		return ""
	}

	values := []string{}
	if fields := r.GetCustomFieldsByType(fieldType); len(fields) > 0 {
		if iValues, ok := fields[0]["value"].([]interface{}); ok {
			for i := range iValues {
				values = append(values, fmt.Sprintf("%v", iValues[i]))
			}
		}
	}

	result := ""
	if len(values) == 1 {
		result = values[0]
	} else if len(values) > 1 {
		result = strings.Join(values, ", ")
	}
	return result
}
// GetCustomFieldValueByType returns string value of the *first* field from custom[] that matches fieldType
GetCustomFieldValueByType returns string value of the *first* field from custom[] that matches fieldType
// GetCustomFieldValueByType returns string value of the * first * field from custom [] that matches fieldType
func (r *Record) GetCustomFieldValueByType(fieldType string) string {
	if fieldType == "" {
		return ""
	}
	values := []string{}
	if fields := r.GetCustomFieldsByType(fieldType); len(fields) > 0 {
		if iValues, ok := fields[0]["value"].([]interface{}); ok {
			for i := range iValues {
				values = append(values, fmt.Sprintf("%v", iValues[i]))
			}
		}
	}
	result := ""
	if len(values) == 1 {
		result = values[0]
	} else if len(values) > 1 {
		result = strings.Join(values, ", ")
	}
	return result
}
func ( r * Record ) GetCustomFieldValueByType ( fieldType string ) string { if fieldType == " " { return " " } values := [ ] string { } if fields := r . GetCustomFieldsByType ( fieldType ) ; len ( fields ) > 0 { if iValues , ok := fields [ 0 ] [ " " ] . ( [ ] interface { } ) ; ok { for i := range iValues { values = append ( values , fmt . Sprintf ( " " , iValues [ i ] ) ) } } } result := " " if len ( values ) == 1 { result = values [ 0 ] } else if len ( values ) > 1 { result = strings . Join ( values , " " ) } return result }
GetCustomFieldValueByType returns string value of the *first* field from custom[] that matches fieldType
GetCustomFieldValueByType returns string value of the * first * field from custom [] that matches fieldType