<?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>Not able to get the value of a expression rule using script task</title><link>https://community.appian.com/discussions/f/process/25798/not-able-to-get-the-value-of-a-expression-rule-using-script-task</link><description>Hi Appian Pals, I have an expression rule which is calculating some data and that data is organized into a map and that list of map is being required to be called in a process variable. In order to do this, I created a script task and then, I saved the</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Not able to get the value of a expression rule using script task</title><link>https://community.appian.com/thread/100757?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 14:02:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f0399166-409a-44a2-a4b2-d513e2a44eeb</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Without seeing the process instance value of your PV it&amp;#39;s hard to tell exactly, but among other possibilities, your property names don&amp;#39;t match, so the expression rule&amp;#39;s value would &lt;em&gt;&lt;strong&gt;NEVER&lt;/strong&gt;&lt;/em&gt; save properly into a CDT where the map value properties are named &amp;quot;&lt;strong&gt;13thDay&lt;/strong&gt;&amp;quot; and the CDT&amp;#39;s corresponding property is named &amp;quot;&lt;strong&gt;ThirteenthDay&lt;/strong&gt;&amp;quot; (etc).&amp;nbsp; Appian would have &lt;em&gt;&lt;strong&gt;absolutely no way&lt;/strong&gt;&lt;/em&gt; of knowing that those property names are referring to the &amp;quot;same&amp;quot; thing, even though they evaluate to the same literal meaning in English.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/14/pastedimage1662645669094v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to get the value of a expression rule using script task</title><link>https://community.appian.com/thread/100729?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 11:12:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:880a74d6-89a1-4aa5-bdc2-c7c53361374a</guid><dc:creator>saifalikhan13</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to get the value of a expression rule using script task</title><link>https://community.appian.com/thread/100728?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 10:59:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d42259d9-087a-474b-9ea6-d1dc006d873d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;This depend a lot on your overall use case. One pattern is to just start a child process for each.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to get the value of a expression rule using script task</title><link>https://community.appian.com/thread/100727?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 10:58:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d8cbcc00-44a7-424b-9a2a-aa10bba14a56</guid><dc:creator>saifalikhan13</dc:creator><description>&lt;p&gt;One more thing Stefan,&amp;nbsp;&lt;br /&gt;I got the values in the cdt object and the same values are coming up in the single process variable which is of type multiple.&lt;br /&gt;But, for every value going forward in the process variable, I need to take the decision.&lt;br /&gt;What should i do in this case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to get the value of a expression rule using script task</title><link>https://community.appian.com/thread/100725?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 10:51:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:52ce326c-f2e3-4e1e-8b59-ce884239d914</guid><dc:creator>saifalikhan13</dc:creator><description>&lt;p&gt;Thanks for the directions Stefan&lt;br /&gt;Let me try to remove the map and directly bind it to the CDT type object.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to get the value of a expression rule using script task</title><link>https://community.appian.com/thread/100724?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 10:48:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f43ed784-ddaa-42f0-821d-c5c4f2338519</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The issue is, that your expression creates a list of lists where each sub-list contains one map.&lt;/p&gt;
&lt;p&gt;Two questions.&lt;/p&gt;
&lt;p&gt;1) Could it be that you use a foreach and wrapped the a!map() call into curly brackets? Remove them.&lt;/p&gt;
&lt;p&gt;2) Why do you create a map instead of the CDT type?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>