<?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>Transferring a local variable in an interface into a process variable</title><link>https://community.appian.com/discussions/f/user-interface/17172/transferring-a-local-variable-in-an-interface-into-a-process-variable</link><description>Hi all, 
 
 I have a pickerFieldUsers field in my interface that I use to store a username into a local variable &amp;quot;local!userToTransferTo&amp;quot; which looks like this: 
 
 a!pickerFieldUsers( label: &amp;quot;New Owner&amp;quot;, labelPosition: &amp;quot;ABOVE&amp;quot;, saveInto: local!userToTransferTo</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Transferring a local variable in an interface into a process variable</title><link>https://community.appian.com/thread/67731?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 07:56:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:34639756-7a17-4d67-9c82-41b821eee271</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Unless you&amp;#39;re intending to use the local!&lt;span&gt;userToTransferTo for something&amp;nbsp;else you could simply point your a!pickerFieldUsers component&amp;nbsp;directly at the rule&amp;nbsp;input:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!pickerFieldUsers(
label: &amp;quot;New Owner&amp;quot;,
labelPosition: &amp;quot;ABOVE&amp;quot;,
saveInto: ri!userToTransferTo,
value: ri!userToTransferTo,
required: true,
validations: {},
placeholder: &amp;quot;--Start typing officer name--&amp;quot;
),&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transferring a local variable in an interface into a process variable</title><link>https://community.appian.com/thread/67729?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 07:45:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fe26c8bb-47a4-4602-9e58-b2a045363c82</guid><dc:creator>davidb545</dc:creator><description>&lt;p&gt;Thanks heaps - that&amp;#39;s got it....&lt;/p&gt;
&lt;p&gt;created a rule input for the form &amp;quot;RIUserToTransferTo&amp;quot; and changed my save code to:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!save(&lt;br /&gt; ri!RIUserToTransferTo,&lt;br /&gt; local!userToTransferTo&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;which seems to be accepted.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;cheers :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transferring a local variable in an interface into a process variable</title><link>https://community.appian.com/thread/67728?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 06:20:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eafb2b21-8993-4fa4-aef9-2f5c70b27573</guid><dc:creator>nareshs427</dc:creator><description>&lt;p&gt;Hi David,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You cannot save any value into process variable as part of saveInto in an Interface. As Jose mentioned above, the values should be transferred to a variable based on the variable context.&lt;/p&gt;
&lt;p&gt;In your case, it is a start form and in order to save the users value in the process variable, create a rule input in the interface and save the value in that rule input. While configuring interface, map the rule input with the process variable you would like to save the values in the &amp;#39;Process Start Form&amp;#39; as shown in the below snapshot. Please note the process variables should be selected as parameter in order to appear in the mappings in Process Start Form.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1561616108517v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&amp;nbsp;Cheers!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transferring a local variable in an interface into a process variable</title><link>https://community.appian.com/thread/67724?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 03:42:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:44639afd-af76-418d-98a8-af4e1e394fff</guid><dc:creator>josep</dc:creator><description>&lt;p&gt;Hello David, &lt;/p&gt;
&lt;p&gt;It is important to understand the execution context, when you are in the process context(domain) you have access to the process variables pv!. When you are in a smart service or process node you are on the activity class context ac! &amp;nbsp;(domain) and when you are on a rule ( expression, interface, or so) you are on the rule context (domain) where you have rule inputs so you have ri!. &lt;/p&gt;
&lt;p&gt;You should map the values between the context &amp;nbsp;you create a node data input variable ac! That you will map and set up the value that comes from the process and later you have a rule input (the same type always, that will receive the activity class variable. &lt;/p&gt;
&lt;p&gt;pv! -&amp;gt; ac! -&amp;gt; ri! &lt;/p&gt;
&lt;p&gt;And you have to do the same when you want to receive a value from the interface. &lt;/p&gt;
&lt;p&gt;ri! -&amp;gt; ac! -&amp;gt; pv! &lt;/p&gt;
&lt;p&gt;The rrror you are experiencing is that you are trying to access a process variable that is not visible on the interface just because you are not in the context. &lt;/p&gt;
&lt;p&gt;Here you can find a discussion about the same &lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/discussions/f/process/12280/passing-process-variable-to-interface-records-tutorial"&gt;community.appian.com/.../passing-process-variable-to-interface-records-tutorial&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;Jose &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>