<?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>Process parameters initialization issue</title><link>https://community.appian.com/discussions/f/new-to-appian/18780/process-parameters-initialization-issue</link><description>I have a proces model for updating employee data (not yet finished but it shouldn&amp;#39;t matter): 
 
 
 
 This process starts with interface that looks like this: 
 
 It means that update process starts with choosing employee from the database through dropdown</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Process parameters initialization issue</title><link>https://community.appian.com/thread/73862?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 14:31:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f8395b2e-c13c-41ef-bd01-f8625602e817</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Generally it would only be really relevant to your start form here due to the variable being initialized to Zero by Appian.&amp;nbsp; In other places that wouldn&amp;#39;t necessarily occur, though if there were a chance for a 0 value to be passed to a dropdown in a similar manner, a similar &amp;quot;zero check&amp;quot; in the code would also be beneficial.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Process parameters initialization issue</title><link>https://community.appian.com/thread/73861?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 14:19:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d030dbe-c7d3-4ea3-94a7-70c6f59e6607</guid><dc:creator>ivanm0004</dc:creator><description>&lt;p&gt;This &lt;em&gt;start form&amp;nbsp;&lt;/em&gt;part confused me, because I understood it as&amp;nbsp;this handling is only meant for this specific process and not for general &amp;quot;0 case&amp;quot; handling on my interface (which I can also reuse in other processes).&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thx for the clarification &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Process parameters initialization issue</title><link>https://community.appian.com/thread/73860?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 13:55:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0cff578b-1afd-43a0-af56-8aba4d3055f1</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="46508" url="~/discussions/f/new-to-appian/18780/process-parameters-initialization-issue/73859"]&lt;p&gt;it means that my dropdown is trying to fetch employee with ID = 0 for it&amp;#39;s default value and fails to do so as I don&amp;#39;t have one with that ID?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Basically.&amp;nbsp; Read the error message you put in your screenshot.&amp;nbsp; In it, it says the value you&amp;#39;re trying to pass is 0, while the choiceValues array is a list of non-zero values.&amp;nbsp; This is a basic requirement of Dropdown Fields - the only exception they can handle is when the Value is &amp;quot;null()&amp;quot;, and even then only if you have a placeholderlabel defined.&lt;/p&gt;
[quote userid="46508" url="~/discussions/f/new-to-appian/18780/process-parameters-initialization-issue/73859"]Or somewhere in the interface code[/quote]
&lt;p&gt;To be fair, I believe i did say &amp;quot;&lt;em&gt;on your start form interface ...the value...&lt;/em&gt;&amp;quot; above, though my wording may have been less clear than I imagined it was.&amp;nbsp; So in other words, here:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1588773227096v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Process parameters initialization issue</title><link>https://community.appian.com/thread/73859?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 13:47:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:735e6814-fec2-4168-8da8-082e703d4586</guid><dc:creator>ivanm0004</dc:creator><description>&lt;p&gt;Ok, it means that my dropdown is trying to fetch employee with ID = 0 for it&amp;#39;s default value and fails to do so as I don&amp;#39;t have one with that ID?&lt;/p&gt;
&lt;p&gt;Also, I&amp;#39;m not sure if I understood&amp;nbsp;your solution correctly:&lt;/p&gt;
&lt;p&gt;You mean to put your IF statement here?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1588772569213v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Or somewhere in the interface code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Process parameters initialization issue</title><link>https://community.appian.com/thread/73857?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 13:36:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:20107f52-ec14-416b-881d-fc88e63a173b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;By default, integer PVs initialize with a value of 0 (zero), not null.&amp;nbsp; That would explain the issue in your dropdown.&amp;nbsp; Within your start form interface, fixing this would be as simple as wrapping the value in an if() statement, like&amp;nbsp;&lt;em&gt;value: if(ri!selectedEmployee = 0, null(), ri!selectedEmployee)&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>