<?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>Passing a button value as PV to a Process</title><link>https://community.appian.com/discussions/f/process/12110/passing-a-button-value-as-pv-to-a-process</link><description>Hello All, 
 I am using an interface to invoke a Process Model to download my claim report. I am able to invoke the process and download the report successfully. But the problem is, when I am trying to invoke a condition such as If the button pressed</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53672?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 14:42:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bcae98b7-50d7-410c-992e-f52ed58a6575</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;It looks like you&amp;#39;ve moved away from using a start form (which is often a good idea), but just in case it helps you for clarification (or others in the future), I&amp;#39;m attaching a small demo app (1 process model and 2 interfaces) which shows how to properly configure a start form to receive data from the user and pass it into the process.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-discussions-components-files/14/4274.SAIL-Start-Form-Demo-App.zip"&gt;community.appian.com/.../4274.SAIL-Start-Form-Demo-App.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53671?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 13:56:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:79e329ab-b1c1-4cac-bb52-29baea69fd04</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;Edit: To add to this, I cannot use ri variable to share the data. Adding the ri variable is invalidating the interface with an error &amp;quot;Expected 1 parameter, passed 0 parameters&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;All this means is that the process model must have the RI added when the interface is being called.&amp;nbsp; This is the standard way of passing information from start forms into the process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53670?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 13:32:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d315a026-b94a-4a38-bc77-973f3a07e34f</guid><dc:creator>AdirajuB</dc:creator><description>Finally! This worked! The moment I cleared the start form, the conditions worked! I couldn&amp;#39;t really use the ri variables as it was not allowed. Thank you very much for your multiple solutions!&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Adi&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53662?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 06:56:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16da4b6a-8ead-4ba8-b9ac-1ec91da1a4da</guid><dc:creator>nafisk0001</dc:creator><description>&lt;p&gt;And if you want to do it without making UI as start form, even that can be done. Please check the attached screenshot&amp;nbsp;docx.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-discussions-components-files/14/2630.screenshots.docx"&gt;community.appian.com/.../2630.screenshots.docx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53661?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 06:47:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:011c767a-afc3-40de-b97f-1015aac4a2a3</guid><dc:creator>nafisk0001</dc:creator><description>&lt;p&gt;Hi Adi,&lt;/p&gt;
&lt;p&gt;If you are using UI as start form for process model, then you can have ri variable.&lt;/p&gt;
&lt;p&gt;What I have done.&lt;/p&gt;
&lt;p&gt;1) In UI,defined ri varible ri!button. Below is the code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!export: bind(
    null(),
    startprocesswrite(80115,
      _
    )
  ),
  a!linkField(
    links: a!submitLink(
      label: &amp;quot;Download&amp;quot;,
      value: &amp;quot;Download&amp;quot;,
      saveInto: {
        a!save(ri!button,&amp;quot;Download&amp;quot;)
      }
    )
  )
)&lt;/pre&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-discussions-components-files/14/screenshots.docx"&gt;community.appian.com/.../screenshots.docx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) In Process Model, created PV as paramater (buttonValue)&lt;/p&gt;
&lt;p&gt;3) Under Process Start form, mapped PV (under value drop down) to an interface ri variable.&lt;/p&gt;
&lt;p&gt;The same is working fine for me. I have tried to attached the screenshots.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53653?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 02:10:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e0ae2a23-cad9-4846-8768-1d83c94e422a</guid><dc:creator>AdirajuB</dc:creator><description>Hi Nafisk001,&lt;br /&gt;
I have tried the method mentioned in the link. It still doesn&amp;#39;t help as the variables are coming as empty. I have attached the screenshot below in the replies.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Adi&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53652?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 02:07:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8bcbb84b-2cd2-4aa6-abd7-c70f42613d53</guid><dc:creator>AdirajuB</dc:creator><description>&lt;p&gt;Hi Vimalkumars,&lt;/p&gt;
&lt;p&gt;Thank you very much for your inputs. I have tried them all, and all of them work in the sense, I am able to invoke the process. But the process variables I defined are always showing null. Is there something I am doing wrong in defining the process variables or is there some error in the way I am accessing them?&lt;/p&gt;
&lt;p&gt;I have even defined my interface as the start form in the Start activity and because there are no ri variables, it doesn&amp;#39;t show any input fields.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do I have to define any specific variable in Process for me to be able to access the saved values from the interface?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/14/3441.error.PNG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/14/3441.error.PNG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Adi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53651?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 01:57:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1f4ae0b7-ce9c-40f2-85b7-fa535c30ca95</guid><dc:creator>vimalkumars</dc:creator><description>&lt;p&gt;Hi AdirajuB,&lt;/p&gt;
&lt;p&gt;I have updated the code for&amp;nbsp;startprocesswrite&amp;nbsp;as below. Please see whether this helps you.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!export: bind(
    null(),
    startprocesswrite(
      cons!ClaimReport_Process_ID,
      _
    )
  ),
  a!linkField(
    links: a!submitLink(
      label: &amp;quot;Download&amp;quot;,
      saveInto: a!save(
        local!export,
        {
          parameterNameClaimID: local!ClaimId,
          parameterNameClaimantID: local!ClaimantID,
          parameterNameButtonValue: &amp;quot;Download&amp;quot;/*Recommended to use the constant*/  
        }
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53650?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 01:38:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c6cb91f1-6df6-4626-b9c1-0b71fc147499</guid><dc:creator>vimalkumars</dc:creator><description>Can you please try the below code and see if this returining you the required outcome?&lt;br /&gt;
&lt;br /&gt;
a!linkField(&lt;br /&gt;
  links: a!dynamicLink(&lt;br /&gt;
    label: &amp;quot;Download&amp;quot;,&lt;br /&gt;
    saveInto: a!startProcess(&lt;br /&gt;
      processModel: cons!YOUR_PROCESS_MODEL,&lt;br /&gt;
      processParameters: {&lt;br /&gt;
        parameterNameClaimID: local!ClaimId,&lt;br /&gt;
        parameterNameClaimantID: local!ClaimantID,&lt;br /&gt;
        parameterNameButtonValue: &amp;quot;Download&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53649?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 01:31:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:06b7aa1d-e0fd-4f1f-9998-d93269f5131a</guid><dc:creator>AdirajuB</dc:creator><description>Hi Vimalkumars,&lt;br /&gt;
yes,  I have tried to do the hard coded value. But the problem is I am not sure how to access this in the process as all the values are coming as empty.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Adi&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53648?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 01:23:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e894694a-06ee-44ad-9610-9225cf23e84d</guid><dc:creator>vimalkumars</dc:creator><description>Hi AdirajuB,&lt;br /&gt;
&lt;br /&gt;
Have you tried testing it by hardcoding the values as below&lt;br /&gt;
 value: {&lt;br /&gt;
        local!ClaimID: local!ClaimId,&lt;br /&gt;
        local!ClaimantID: local!ClaimantID,&lt;br /&gt;
        local!buttonValue: &amp;quot;Download&amp;quot; /*Recommended to use the constant*/&lt;br /&gt;
      },&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53647?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 01:22:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e63e8642-77ae-4e6c-909c-c08828c0c66b</guid><dc:creator>AdirajuB</dc:creator><description>Hi Vimalkumars,&lt;br /&gt;
I have been using like the one you shared. Unfortunately, neither of the values are accessible in the Process or I have no idea how to access this buttonValue inside the process instance.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Adi&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53646?ContentTypeID=1</link><pubDate>Mon, 26 Mar 2018 00:10:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e72e6160-d362-4fe6-95bf-3c1407760c24</guid><dc:creator>vimalkumars</dc:creator><description>&lt;p&gt;Incase if you are using two linkfields one for &amp;quot;Download&amp;quot; and One for &amp;quot;Email&amp;quot;, Try using the below code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;{
  a!linkField(
    label: &amp;quot;Send as Email&amp;quot;,
    links: a!submitLink(
      value: {
        local!ClaimID: local!ClaimId,
        local!ClaimantID: local!ClaimantID,
        local!buttonValue: &amp;quot;Send as Email&amp;quot; /*Recommended to use the constant*/
      },
      saveInto: local!export
    )
  ),
  a!linkField(
    label: &amp;quot;Download&amp;quot;,
    links: a!submitLink(
      value: {
        local!ClaimID: local!ClaimId,
        local!ClaimantID: local!ClaimantID,
        local!buttonValue: &amp;quot;Download&amp;quot; /*Recommended to use the constant*/
      },
      saveInto: local!export
    )
  )
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53642?ContentTypeID=1</link><pubDate>Sun, 25 Mar 2018 16:07:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb6fd44b-22e4-4f98-a01c-190d4f9ef4a1</guid><dc:creator>nafisk0001</dc:creator><description>I will have to get that a try.. But in mean time, see if it is any help to you.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://community.appian.com/discussions/f/general/5221/do-we-have-an-option-to-invoke-a-process-model-from-sail-code/19439#19439"&gt;community.appian.com/.../19439&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53641?ContentTypeID=1</link><pubDate>Sun, 25 Mar 2018 14:44:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:19663c7a-dd8b-48d8-97be-860473a56a0c</guid><dc:creator>AdirajuB</dc:creator><description>Hi Nafisk001,&lt;br /&gt;
Here is the code snippet from my interface. I am not using any smart service. I am using the bind, get, set to start the process from the interface. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local!export: bind(&lt;br /&gt;
get{local!ClaimID, local!ClaimantID, local!buttonValued},&lt;br /&gt;
startprocesswrite(cons!ClaimReport_Process_ID, _)&lt;br /&gt;
&lt;br /&gt;
a!submitLink(&lt;br /&gt;
value:{&lt;br /&gt;
local!ClaimID: local!ClaimId,&lt;br /&gt;
local!ClaimantID: local!ClaimantID,&lt;br /&gt;
local!buttonValue:local!buttonValue&lt;br /&gt;
},&lt;br /&gt;
 saveInto: local!export&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Passing a button value as PV to a Process</title><link>https://community.appian.com/thread/53638?ContentTypeID=1</link><pubDate>Sun, 25 Mar 2018 08:44:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0195ce3a-3861-4e28-b640-a61b730268f5</guid><dc:creator>nafisk0001</dc:creator><description>Hi Adi,&lt;br /&gt;
&lt;br /&gt;
Are you smart service (start process), if so, please check that PV is set to parameter inside process model and you are passing it correctly.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Nafis Khan&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>