Is there a programmatic way to determine the data type of a specific field?

#1

I know I can retrieve information about fields on a Type from Get all fields of a given type

But what if all I knew were the Type and the field? Could I determine what data type that field is without looping through all the fieldTypes() until i match the fieldTypes().name()?

0 Likes

#2

MyType.fieldType('fieldName')

0 Likes

#3

Where can I find documentation on .fieldType()?

0 Likes

#4

c3ShowType(Type)
see fieldType

0 Likes

#5

c3ShowFunc(MyType, “fieldType”)

0 Likes

#6

fieldType is defined on the Type type, not on MyType, so it’ll have to be:
c3ShowFunc(Type, 'fieldType')

0 Likes