<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=388" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Liste aller Felder einer Tabelle ausgeben]]></title>
<description><![CDATA[
<p>Unl&auml;ngst ben&ouml;tigte ich eine Liste aller Felder einer Tabelle mit deren Datentypen. Daf&uuml;r habe ich mir den folgenden Job - im Beispiel f&uuml;r die Tabelle <em>custGroup </em>- geschrieben:
</p>


<pre class="pre_blog_axcode">
static void listAllFields4Table(Args _args)
{
    dictTable   dictTable = new dictTable(tableNum(custGroup));
    int         currFieldId = 0;
    counter     c = 0;
    dictField   dictField;
    counter     a = 0;
    common      common;
    str         enumName;
    ;

    common = DictTable.makeRecord();
    setPrefix(strFmt(&quot;Fields of table %1&quot;,  tableId2name(common.TableId)));

    currFieldId = 0;
    c = 0; 
    do
    {
        currFieldId = dictTable.fieldNext(currFieldId); 
        if(currFieldId != 0)
        {
            dictField = new dictField(common.TableId, currFieldId); 
            if(dictField.arraySize() == 1)
            {
                info(   strFmt(&quot;%1: %2 [%3%4]&quot;,
                        dictTable.fieldName(currFieldId),
                        dictField.label(),
                        dictField.baseType(),
                        dictField.enumId() ? strFmt(&quot; %1&quot;, enumId2Name(dictField.enumId())) : &quot;&quot;)
                     );
            }
            else if(dictField.arraySize() &gt; 1)
            {
                for(a=1;a&lt;=dictField.arraySize();a++)
                {
                    info(   strFmt(&quot;%1 [%2]: %3 [%4]&quot;,
                            dictTable.fieldName(currFieldId),
                            a,
                            dictField.label(),
                            dictField.baseType())
                         );
                }
            }
        }
        c++;
    }
    while (c &lt; dictTable.fieldCnt());
}
</pre>

<br /><a class="div_blog_category_gotodetail" href="https://www.schweda.net/blog_ax.php?bid=388" target="_self" title="Weiterlesen...">Weiterlesen...</a>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sat, 24 Jul 2010 10:59:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=388</link>
<comments>https://www.schweda.net/blog_ax.php?bid=388</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=388</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=388</wfw:commentRss>
</item>
</channel>
</rss>	
