<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Doens.be &#187; picklist</title>
	<atom:link href="http://www.doens.be/tag/picklist/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doens.be</link>
	<description></description>
	<lastBuildDate>Sat, 07 Jan 2012 04:20:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Select Table/Field/User/&#8230; (PickList)</title>
		<link>http://www.doens.be/2009/04/select-tablefielduser-picklist/</link>
		<comments>http://www.doens.be/2009/04/select-tablefielduser-picklist/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 18:43:46 +0000</pubDate>
		<dc:creator>Jeroen Doens</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[picklist]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[X++]]></category>

		<guid isPermaLink="false">http://www.doens.be/?p=71</guid>
		<description><![CDATA[Sometimes you want your user to select a sertain table/field/&#8230; When you want to program this selection all by yourself you have to make a table, override the lookup()-method, &#8230; There is also a easy way to do this. You can use the pic**** methodes in the Global class: How do you use these classes [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want your user to select a sertain table/field/&#8230; When you want to program this selection all by yourself you have to make a table, override the lookup()-method, &#8230;</p>
<p>There is also a easy way to do this. You can use the pic**** methodes in the Global class:<br />
<img class="size-full wp-image-72 alignnone" title="global-pick-1" src="http://www.doens.be/wp-content/uploads/2009/04/global-pick-1.jpg" alt="" /></p>
<p>How do you use these classes (you can find this example in <em>\Forms\DocuOptionTable\Designs\Design\[Tab:TableTab]\[TabPage:Overview]\[Grid:TableOverviewGrid]\StringEdit:DocuTableName\Methods\lookup</em>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="xpp" style="font-family:monospace;"><span style="color: #0000ff;">void</span> lookup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    tableId id;
;
    id <span style="color: #00007f;">=</span> pickTable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #0000ff;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #00007f;">!</span> id<span style="color: #000000;">&#41;</span>
        <span style="color: #0000ff;">return</span>;
    docuTable.<span style="color: #000000;">DocuTableId</span> <span style="color: #00007f;">=</span> id;
    docuTable_ds.<span style="color: #000000;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>The result:<br />
<img class="size-full wp-image-72 alignleft" title="global-pick-2" src="http://www.doens.be/wp-content/uploads/2009/04/global-pick-2.jpg" alt="" width="174" height="263" /><br />
<img class="size-full wp-image-72 alignnone" title="global-pick-3" src="http://www.doens.be/wp-content/uploads/2009/04/global-pick-3.jpg" alt="" width="308" height="243" /></p>
<p>When you want to create you own customized pick-dialog you can by entering the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="xpp" style="font-family:monospace;"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> testPickList<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    Object      formRun;
    <span style="color: #0000ff;">container</span>   con;
    ;
    formRun <span style="color: #00007f;">=</span> classfactory.<span style="color: #000000;">createPicklist</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    formRun.<span style="color: #000000;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
    <span style="color: #007f00;">//fill container con</span>
&nbsp;
    formRun.<span style="color: #000000;">choices</span><span style="color: #000000;">&#40;</span>con<span style="color: #000000;">&#41;</span>; <span style="color: #007f00;">// you can add a secundary parameter wth the imiges</span>
    formRun.<span style="color: #000000;">caption</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;TEST&quot;</span><span style="color: #000000;">&#41;</span>; <span style="color: #007f00;">// Make label</span>
    formRun.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    formRun.<span style="color: #000000;">wait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #0000ff;">if</span> <span style="color: #000000;">&#40;</span>formRun.<span style="color: #000000;">choice</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0000ff;">print</span> formRun.<span style="color: #000000;">choice</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
    <span style="color: #0000ff;">pause</span>;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.doens.be/2009/04/select-tablefielduser-picklist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

