How to get XSD of a cdt at runtime

Hi,

How to get XSD of a cdt at runtime? Is there any way that we can pass a datatype number or cdt name and it returns a xsd of that cdt.

 

Thanks.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hello Rahul,

    I have seen this plugin that might help you, my question can be, you need the cdt description/xsd information? Or specifically the XSD?

    For the first option take a look at this plugin, it is intended on visualize the cdt’s, and it includes a function cv_getfieldsofcdt, and others, you should take a look.

    forum.appian.com/.../summary


    In the other side if you need the XSD, well you can export the CDT programmatically, or something to get it, let me know if this is your use case maybe i can help you further.

    Jose
  • 0
    A Score Level 1
    in reply to josep
    Thank you Jose.

    The mentioned plugin is useful for getting the cdt fields and their type. Its not returning the primary key.

    we can export the cdt with data but is their any way to export cdt structure also?
  • 0
    Certified Associate Developer
    in reply to rahulz
    Did you try following Java APIs?
    1. TypeService will give you DataType
    2. DataType will give you TypeProperties (i.e. NamedTypeValue)
    3. NamedTypeValue returns TypeRef.
    a. I think in the TypeRef, you will find what you need
    b. Unfortunately the JavaDoc has not exposed anything on TypeRef except that we get its reference from NamedTypeValue. So you may have to play around that a bit to figure out what all information the TypeRef expose
Reply
  • 0
    Certified Associate Developer
    in reply to rahulz
    Did you try following Java APIs?
    1. TypeService will give you DataType
    2. DataType will give you TypeProperties (i.e. NamedTypeValue)
    3. NamedTypeValue returns TypeRef.
    a. I think in the TypeRef, you will find what you need
    b. Unfortunately the JavaDoc has not exposed anything on TypeRef except that we get its reference from NamedTypeValue. So you may have to play around that a bit to figure out what all information the TypeRef expose
Children