<?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>Update constant smart service Invalid Cast: Cannot cast from type &amp;#39;Document&amp;#39; to type &amp;#39;Content Constant&amp;#39;</title><link>https://community.appian.com/discussions/f/process/35494/update-constant-smart-service-invalid-cast-cannot-cast-from-type-document-to-type-content-constant</link><description>I am getting the error: 
 Details: Invalid Cast: Cannot cast from type &amp;#39;Document&amp;#39; to type &amp;#39;Content Constant&amp;#39; (Data Inputs) 
 When trying to replace the constant contents, which is a constant that is a list of Documents. How do I fix? 
 It doesn&amp;#39;t work</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Update constant smart service Invalid Cast: Cannot cast from type 'Document' to type 'Content Constant'</title><link>https://community.appian.com/thread/138301?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 18:34:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f5fbc7ed-a796-4ac1-96ca-08f699c9e23a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The best I can suggest is that you might need to configure an Update Constant node unique to each Constant which you need to update - and use in-process logic (gateways, etc) to decide which one(s) to execute at a given time.&amp;nbsp; For the error you&amp;#39;re still getting, you probably need to make sure the type of data you&amp;#39;re passing into the node for the new constant value exactly matches the constant&amp;#39;s type (which would include both data type as well as list/single).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update constant smart service Invalid Cast: Cannot cast from type 'Document' to type 'Content Constant'</title><link>https://community.appian.com/thread/138300?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 18:20:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:27b17da6-22b5-435c-bb33-a8ea16379c72</guid><dc:creator>ginao0001</dc:creator><description>&lt;p&gt;I&amp;#39;m a bit confused - this sounds the opposite of the screenshot David provided, but I tried the selecting from my constants in the env as you suggested and it worked. This process model needs to update 1-3 constants depending on a condition though, and I am testing the updating 2 constants - it throws the same error even though I updated the second one the same way. How can we update multiple constants in the same process model?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update constant smart service Invalid Cast: Cannot cast from type 'Document' to type 'Content Constant'</title><link>https://community.appian.com/thread/138297?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 16:42:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:215931ae-740a-4af3-a7be-2934ff1faa97</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;As David indicated - for the smart service to work, you have to select the constant from the picker.&amp;nbsp; I&amp;#39;m not sure if there&amp;#39;s any way to do it via the expressionable editor (which is what you probably did) which would work.&amp;nbsp; The problem this creates is, when the process goes to update the constant, instead of seeing a *reference to the constant* (which you&amp;#39;d get from the constant picker), instead it&amp;#39;s evaluating the constant and returning its value - hence your error message.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update constant smart service Invalid Cast: Cannot cast from type 'Document' to type 'Content Constant'</title><link>https://community.appian.com/thread/138295?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 15:23:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5b946b4e-e375-4f8e-aa34-5b7d17c1425d</guid><dc:creator>ginao0001</dc:creator><description>&lt;p&gt;Not sure what tab it is referring to, but I clicked the edit button and manually wrote out the constant.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update constant smart service Invalid Cast: Cannot cast from type 'Document' to type 'Content Constant'</title><link>https://community.appian.com/thread/138289?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 15:05:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a009decf-26dc-4b11-92df-1c1e354081b0</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;Did you have this in mind when included the smart service in your process?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/14/pastedimage1721315083730v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>