<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to get XSD of a cdt at runtime</title><link>https://community.appian.com/discussions/f/general/12619/how-to-get-xsd-of-a-cdt-at-runtime</link><description>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.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56412?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 08:35:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:96da0acf-d393-4f67-b531-b963f2cbf30f</guid><dc:creator>rahulz</dc:creator><description>Thanks Gaurav.&lt;br /&gt;
&lt;br /&gt;
We tried this and got information of CDT. But we actually need to find primary key of a cdt. We found nothing in public API for this. If by anyway we get XSD, then we can find primary key from it.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56377?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 08:33:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:64a98997-4739-4b10-992c-b8ca8c929cf9</guid><dc:creator>gaurav_laturkar</dc:creator><description>Did you try following Java APIs?&lt;br /&gt;
1.	TypeService will give you DataType&lt;br /&gt;
2.	DataType will give you TypeProperties (i.e. NamedTypeValue)&lt;br /&gt;
3.	NamedTypeValue returns TypeRef. &lt;br /&gt;
a.	I think in the TypeRef, you will find what you need&lt;br /&gt;
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&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56324?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 08:21:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df7120d7-05a7-44e9-95e5-60be77b6311d</guid><dc:creator>rahulz</dc:creator><description>Thank you Jose.&lt;br /&gt;
&lt;br /&gt;
The mentioned plugin is useful for getting the cdt fields and their type. Its not returning the primary key.&lt;br /&gt;
&lt;br /&gt;
we can export the cdt with data but is their any way to export cdt structure also?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56322?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 08:04:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d92346bf-0016-4306-affd-e51a5ac57c84</guid><dc:creator>rahulz</dc:creator><description>Thanks Ashvin. &lt;br /&gt;
My requirement is to find the cdt properties like the fields it contents, their type and the primary key of that field. We can find field names and their type problematically but I am facing challenge in retrieving the primary key. If we got XSD from cdt, we can look for @Id annotation to find primary key.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56321?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 07:59:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:214113de-51f9-437d-a416-015caa4cd169</guid><dc:creator>rahulz</dc:creator><description>Thanks Umesh.&lt;br /&gt;
&lt;br /&gt;
I have seen these APIs and tried the above mentioned classes. This classes gives information of Datatype and its field names and their type. I particularly need to find the primary key from the cdt. There is no direct function is available in these classes to find the primary key of a cdt.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56298?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 17:37:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f4d92c8-2909-43eb-88c1-a95c83e74cc0</guid><dc:creator>josep</dc:creator><description>Hello Rahul, &lt;br /&gt;
&lt;br /&gt;
I have seen this plugin that might help you, my question can be, you need the cdt description/xsd information? Or specifically the XSD? &lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://forum.appian.com/suite/sites/shared-components/page/shared-components/record/lMBCLGOdlMUpdGVqW3dQaIKmclBmvvNEj8vu_cjb7T-5YiPr4Fu8ly5Yj1s09uenE4RYzA8zKyx7eiUh-ynLnNajSjWskhlHOMv_Hc0iLlJjBHhkg/view/summary"&gt;forum.appian.com/.../summary&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Jose&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56296?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 15:41:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f031b971-7201-4e8e-afb5-78a53d99ee24</guid><dc:creator>Umesh Patel</dc:creator><description>Hi Rahul,&lt;br /&gt;
&lt;br /&gt;
Can you try using API&amp;#39;s (&lt;a href="https://docs.appian.com/suite/help/18.1/api/)"&gt;docs.appian.com/.../)&lt;/a&gt;&lt;br /&gt;
Particulary check below,&lt;br /&gt;
&lt;br /&gt;
com.appiancorp.suiteapi.type&lt;br /&gt;
Class Datatype&lt;br /&gt;
&lt;br /&gt;
java.lang.Object&lt;br /&gt;
com.appiancorp.suiteapi.type.DatatypeProperties&lt;br /&gt;
com.appiancorp.suiteapi.type.Datatype&lt;br /&gt;
&lt;br /&gt;
There is a method to get Datatype from qName. Check if its useful for you.&lt;br /&gt;
&lt;br /&gt;
static Datatype	findByQName(Datatype[] dts, javax.xml.namespace.QName targetQName)&lt;br /&gt;
Finds the Datatype object in the given array that has the given qname.&lt;br /&gt;
&lt;br /&gt;
you can also use class &amp;#39;DatatypeProperties&amp;#39; for getting more details about the data types.&lt;br /&gt;
&lt;br /&gt;
Regards, &lt;br /&gt;
Umesh&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get XSD of a cdt at runtime</title><link>https://community.appian.com/thread/56295?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 14:38:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a99e687b-609a-4a33-858d-31a1098f2ae8</guid><dc:creator>Ashvin Kapur</dc:creator><description>Rahul, AFAIK, there is no OOTB capability (or plugin that I&amp;#39;m aware of) to produce the CDT&amp;#39;s XSD based on an input at runtime. What is the use case you&amp;#39;re trying to solve for?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>