Skip to main content
sachinshankarv2
December 19, 2024
Question

Find list of CDT/record types in the application that uses specific data type

  • December 19, 2024
  • 4 replies
  • 0 views

I'm trying to get the list of the custom data types that uses date and time field in it, from the whole application. Kindly post your suggestions, Thank you.

4 replies

stefanhelzle0001
December 19, 2024

Export all CDTs and check the XSDs.

sachinshankarv2
December 20, 2024

It might be time consuming for more numbers

mathieud0001
December 19, 2024

If you can find a way to get the list of CDTs, you could do this

a!localVariables(
  local!CDTList: {
    'type!{urn:com:appian:types:S}S_COM_35103'()
  },
  a!forEach(
    items: local!CDTList,
    expression: a!localVariables(
      local!CDT: fv!item,
      local!CDTTypeName: typename(typeof(local!CDT)),
      local!keys: a!keys(local!CDT),
      a!forEach(
        items: local!keys,
        expression: a!localVariables(
          local!field: fv!item,
          local!fieldType: typeof(index(local!CDT, local!field, null)),
          local!fieldTypeName: typename(local!fieldType),
          if(
            local!fieldType = 9,
            a!map(
              entityName: local!CDTTypeName,
              fieldName: local!field,
              fieldType: local!fieldType,
              fieldTypeName: local!fieldTypeName
            ),
            {}
          )
        )
      )
    )
  )
)

sachinshankarv2
December 20, 2024

Thanks for the response.[mention:f5e81b8502fa4e77ad12697686a4fc56:e9ed411860ed4f2ba0265705b8793d05]