<?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>Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/discussions/f/data/28008/using-rule-inputs-between-interfaces</link><description>No longer need assistance, thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/109296?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 06:20:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5ede5db8-b5f2-4d0d-ac52-4a63ca6bdedc</guid><dc:creator>Srinivas Thota </dc:creator><description>&lt;p&gt;Hi davinar,&lt;/p&gt;
&lt;p&gt;you storing the selection values in the local variable but that local variable has limited access like it can used between 102 line no to line no 138 and localvariable &amp;quot;local!PokemonChoice&amp;quot; to reference to&amp;nbsp;main local varaible which got initialized in the line 1. Its like nested local variables but no reference from parent varaibles to child variables.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/109029?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 16:43:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:02703df0-064a-44d7-8a65-1e3f3198b2c8</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Well, if your child interface is &lt;em&gt;rule!DS_LocalVarAPRTest()&lt;/em&gt; as implied by your screenshot - this is not the syntax you&amp;#39;d use to pass a local variable held by the parent.&amp;nbsp; This is pretty basic syntax for calling Rules in Appian at this point - honestly you might need to go back and review / re-practice the basics.&lt;/p&gt;
&lt;p&gt;Anyway to answer your question, the proper way to call this child interface assuming it has a variable named &lt;em&gt;ri!pkmnChoice&lt;/em&gt; which you want to pass the value of &lt;em&gt;local!PokemonChoice&lt;/em&gt;, should look like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;rule!DS_LocalVarAPRTest(
  pkmnChoice: local!PokemonChoice
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/109027?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 16:39:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:21ec2c95-50af-44cb-b30d-e3a374d1dd74</guid><dc:creator>davinar9817</dc:creator><description>&lt;p&gt;Well I&amp;#39;m mostly just trying to pass a rule input into the interface so I can display it.&lt;/p&gt;
&lt;p&gt;I have this error and I&amp;#39;m not sure why&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1678293614854v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1678293634618v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/109024?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 15:49:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:61bac5ed-b99b-42f9-8be3-56af34c854ae</guid><dc:creator>pragna jadda</dc:creator><description>&lt;p&gt;I think, In grid field we have to refer fv!row to display data. You already stored the data in data parameter in grid field. so we can display only whatever data we have given.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/109023?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 15:17:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9f1fd853-d8ef-4fea-bbf8-62a6e252990a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;d suggest you try and get this working first in a simplified / single interface, then move on from there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/109021?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 15:00:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4796cc86-bcea-4d93-8a9e-6dab7e2c59e0</guid><dc:creator>davinar9817</dc:creator><description>&lt;p&gt;Your link didn&amp;#39;t work for me, and yes here&amp;#39;s the full code&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  {
    a!gridField(
      data: a!recordData(
        recordType: &amp;#39;recordType!{ba350028-3b3e-4bca-babd-abe7e223a3e9}DS APR COPY&amp;#39;,
        filters: {
          a!queryFilter(
            field: &amp;#39;recordType!{ba350028-3b3e-4bca-babd-abe7e223a3e9}DS APR COPY.fields.{4cada3be-cfb9-4975-aabf-7a131211805c}requestId&amp;#39;,
            operator: &amp;quot;=&amp;quot;,
            value: ri!requestId,
            applyWhen: a!isNotNullOrEmpty(ri!requestId)
          ),
          a!queryFilter(
            field: &amp;#39;recordType!{ba350028-3b3e-4bca-babd-abe7e223a3e9}DS APR COPY.fields.{cc19b7f0-3dc0-469a-b711-93b382ede170}isActive&amp;#39;,
            operator: &amp;quot;=&amp;quot;,
            value: true()
          )
        }
      ),
      columns: {
      
        a!gridColumn(
          label: &amp;quot;Quality Codes&amp;quot;,
          sortField: ri!pkmnChoice,
          value: ri!pkmnChoice,
          align: &amp;quot;CENTER&amp;quot;,
          width: &amp;quot;NARROW&amp;quot;
        ),
        a!gridColumn(
          label: &amp;quot;Quantity&amp;quot;,
          value: fv!row[&amp;#39;recordType!{ba350028-3b3e-4bca-babd-abe7e223a3e9}DS APR COPY.fields.{80bf64db-41ec-407a-83d7-4b0cc8a10c9d}quantity&amp;#39;],
          align: &amp;quot;CENTER&amp;quot;,
          width: &amp;quot;NARROW&amp;quot;
        ),
        a!gridColumn(
          label: &amp;quot;UOM&amp;quot;,
          value: rule!DS_QE_GetUnitOfMeasureDescriptionFromId(
            fv!row[&amp;#39;recordType!{ba350028-3b3e-4bca-babd-abe7e223a3e9}DS APR COPY.fields.{900f2942-bc71-4395-a119-66131a478806}uomID&amp;#39;]
          ),
          align: &amp;quot;CENTER&amp;quot;,
          width: &amp;quot;NARROW&amp;quot;
        ),
        a!gridColumn(
          label: &amp;quot;Unit Cost&amp;quot;,
          value: if(
            a!isNullOrEmpty(
              fv!row[&amp;#39;recordType!{ba350028-3b3e-4bca-babd-abe7e223a3e9}DS APR COPY.fields.{ae629137-5672-4a79-9a06-76e70d68b215}unitCost&amp;#39;]
            ),
            dollar(&amp;quot;0&amp;quot;),
            dollar(
              fv!row[&amp;#39;recordType!{ba350028-3b3e-4bca-babd-abe7e223a3e9}DS APR COPY.fields.{ae629137-5672-4a79-9a06-76e70d68b215}unitCost&amp;#39;]
            )
          ),
          align: &amp;quot;CENTER&amp;quot;,
          width: &amp;quot;NARROW_PLUS&amp;quot;
        ),

      },
      borderStyle: &amp;quot;LIGHT&amp;quot;,
      shadeAlternateRows: true(),
      refreshAlways: true(),
      showSearchBox: false(),
      showRefreshButton: false(),
      showExportButton: false()
    ),
    a!richTextDisplayField(
      label: &amp;quot;Total Cost: &amp;quot;,
      labelPosition: &amp;quot;COLLAPSED&amp;quot;,
      value: a!richTextItem(
        text: &amp;quot;Total Cost:   &amp;quot; &amp;amp; dollar(a!defaultValue(ri!totalCost, 0)), style: &amp;quot;STRONG&amp;quot;),
      align: &amp;quot;RIGHT&amp;quot;
      
      
    )
  }
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!numberOfExistingItems: a!refreshVariable(
    value: if(a!isNullOrEmpty(ri!requestItems), 0, length(ri!requestItems)),
    refreshOnReferencedVarChange: false()
  ),
  local!uomId: rule!APR_QE_GetUnitOfMeasure(),
  local!hardwareTypeList: rule!APR_QR_GetHardwareTypeList(),
  {
    a!gridLayout(
      label: &amp;quot;Material Request Items&amp;quot;,
      labelPosition: &amp;quot;COLLAPSED&amp;quot;,
      headerCells: {
        a!gridLayoutHeaderCell(
          label: &amp;quot;Item Part Number&amp;quot;,
          helpTooltip: &amp;quot;Number to be traced in inventory.&amp;quot;,
          align: &amp;quot;CENTER&amp;quot;
        ),
        a!gridLayoutHeaderCell(
          label: &amp;quot;Item Description&amp;quot;,
          align: &amp;quot;CENTER&amp;quot;
        ),
        a!gridLayoutHeaderCell(
          label: &amp;quot;Manufacturer/Vendor Part Number&amp;quot;,
          align: &amp;quot;CENTER&amp;quot;
        ),
        a!gridLayoutHeaderCell(label: &amp;quot;HW Class&amp;quot;, align: &amp;quot;CENTER&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Quality Codes&amp;quot;, align: &amp;quot;CENTER&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Quantity&amp;quot;, align: &amp;quot;CENTER&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;UOM&amp;quot;, align: &amp;quot;CENTER&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Unit Cost&amp;quot;, align: &amp;quot;CENTER&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Note&amp;quot;, align: &amp;quot;CENTER&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Total Cost&amp;quot;, align: &amp;quot;LEFT&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot;)
      },
      columnConfigs: {
        /* Item Part Number */
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
        /* Item Description */
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 3),
        /* Manufacturer/Vendor Part Number */
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
        /*Hardware Class*/
        a!gridLayoutColumnConfig(width: &amp;quot;NARROW&amp;quot;),
        /*Quality Codes*/
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 1),
        /*Quantity*/
        a!gridLayoutColumnConfig(width: &amp;quot;NARROW&amp;quot;),
        /* UOM */
        a!gridLayoutColumnConfig(width: &amp;quot;NARROW&amp;quot;),
        /* Unit Cost */
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 1),
        /* Note */
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 2),
        /* Total Cost */
        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight: 1),
        /* Delete button */
        a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
      },
      rows: a!forEach(
        items: ri!requestItems,
        expression: a!gridRowLayout(
          id: fv!index,
          contents: {
            a!textField(
              value: fv!item.partNumber,
              saveInto: { fv!item.partNumber },
              characterLimit: 255,
              showCharacterCount: false,
              required: true(),
              requiredMessage: &amp;quot;Part Number cannot be empty&amp;quot;,
              validationGroup: &amp;quot;Validate_Form&amp;quot;
              
            ),
            a!textField(
              value: fv!item.description,
              saveInto: { fv!item.description },
              characterLimit: 1000,
              showCharacterCount: false
              
            ),
            a!textField(
              value: fv!item.vendorPartNumber,
              saveInto: { fv!item.vendorPartNumber },
              characterLimit: 255,
              showCharacterCount: false
              
            ),
            a!dropdownField(
              placeholder: &amp;quot;HW Class&amp;quot;,
              choiceLabels: index(
                local!hardwareTypeList,
                &amp;#39;recordType!{ad3656f4-f6c6-4b61-a1d3-6bdaa55d447c}APR Hardware Type.fields.{3ed3a1fc-1387-4d04-a871-66422d11e684}name&amp;#39;
              ),
              choiceValues: index(
                local!hardwareTypeList,
                &amp;#39;recordType!{ad3656f4-f6c6-4b61-a1d3-6bdaa55d447c}APR Hardware Type.fields.{37ea6949-fb4c-4209-9ce5-33f3777647b3}hardwareTypeId&amp;#39;
              ),
              value: fv!item.hardwareTypeId,
              saveInto: fv!item.hardwareTypeId
              
            ),
            a!localVariables(
              local!PokemonChoice: null,
              a!multipleDropdownField(
                label: &amp;quot;Quality Codes&amp;quot;,
                choiceLabels: {
                  &amp;quot;Kabuto&amp;quot;,
                  &amp;quot;Kabutops&amp;quot;,
                  &amp;quot;Aerodactyl&amp;quot;,
                  &amp;quot;Snorlax&amp;quot;,
                  &amp;quot;Articuno&amp;quot;,
                  &amp;quot;Zapdos&amp;quot;,
                  &amp;quot;Moltres&amp;quot;,
                  &amp;quot;Dratini&amp;quot;,
                  &amp;quot;Dragonair&amp;quot;,
                  &amp;quot;Dragonite&amp;quot;,
                  &amp;quot;Mewtwo&amp;quot;,
                  &amp;quot;Mew&amp;quot;,
                },
                choiceValues: {
                  &amp;quot;Kabuto&amp;quot;,
                  &amp;quot;Kabutops&amp;quot;,
                  &amp;quot;Aerodactyl&amp;quot;,
                  &amp;quot;Snorlax&amp;quot;,
                  &amp;quot;Articuno&amp;quot;,
                  &amp;quot;Zapdos&amp;quot;,
                  &amp;quot;Moltres&amp;quot;,
                  &amp;quot;Dratini&amp;quot;,
                  &amp;quot;Dragonair&amp;quot;,
                  &amp;quot;Dragonite&amp;quot;,
                  &amp;quot;Mewtwo&amp;quot;,
                  &amp;quot;Mew&amp;quot;,
                },
                value: local!PokemonChoice,
                saveInto: local!PokemonChoice,
                placeholder: &amp;quot;Select a Pokemon&amp;quot;,
                )
                ),
            a!integerField(
              value: a!defaultValue(value: fv!item.quantity, default: 0),
              saveInto: {
                fv!item.quantity,
                a!save(
                  target: fv!item.totalCost,
                  value: rule!APR_UTIL_calculateItemTotalCost(fv!item)
                )
              }
            ),
            a!dropdownField(
              placeholder: &amp;quot;UOM&amp;quot;,
              choiceLabels: index(local!uomId, &amp;quot;description&amp;quot;, {}),
              choiceValues: index(local!uomId, &amp;quot;measureId&amp;quot;, {}),
              value: fv!item.uomId,
              saveInto: { fv!item.uomId }
            ),
            a!floatingPointField(
              value: a!defaultValue(value: fv!item.unitCost, default: 0),
              saveInto: {
                fv!item.unitCost,
                a!save(
                  target: fv!item.totalCost,
                  value: rule!APR_UTIL_calculateItemTotalCost(fv!item)
                )
              }
            ),
            a!textField(
              value: fv!item.note,
              saveInto: fv!item.note,
              characterLimit: 1000,
              showCharacterCount: false
              
            ),
            a!textField(
              value: if(
                a!isNullOrEmpty(fv!item.unitCost),
                dollar(&amp;quot;0&amp;quot;),
                dollar(
                  rule!APR_UTIL_calculateItemTotalCost(fv!item)
                )
              ),
              readOnly: true()
            ),
            if(
              fv!index &amp;gt; local!numberOfExistingItems,
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;close&amp;quot;,
                  link: a!dynamicLink(
                    value: fv!index,
                    saveInto: {
                      a!save(
                        ri!requestItems,
                        remove(ri!requestItems, save!value)
                      )
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              ),
              if(
                fv!item.isActive,
                a!richTextDisplayField(
                  value: a!richTextIcon(
                    icon: &amp;quot;times&amp;quot;,
                    altText: &amp;quot;Remove&amp;quot;,
                    caption: &amp;quot;Remove&amp;quot;,
                    link: a!dynamicLink(
                      value: false(),
                      saveInto: fv!item.isActive
                    ),
                    linkStyle: &amp;quot;STANDALONE&amp;quot;
                  )
                ),
                a!richTextDisplayField(
                  value: a!richTextIcon(
                    icon: &amp;quot;undo&amp;quot;,
                    altText: &amp;quot;Undo&amp;quot;,
                    Caption: &amp;quot;Undo&amp;quot;,
                    link: a!dynamicLink(value: true(), saveInto: fv!item.isActive),
                    linkStyle: &amp;quot;STANDALONE&amp;quot;
                  )
                )
              )
            )
          }
        )
      ),
      addRowLink: a!dynamicLink(
        label: &amp;quot;Add Item&amp;quot;,
        value: &amp;#39;type!{urn:com:appian:types:APR}APR_Request_Item&amp;#39;(
          partNumber: &amp;quot;&amp;quot;,
          description: &amp;quot;&amp;quot;,
          quantity: 0,
          unitCost: 0,
          totalCost: 0,
          isActive: true(),
          createdBy: loggedInUser(),
          createdDate: now()
        ),
        saveInto: {
          a!save(
            ri!requestItems,
            append(ri!requestItems, save!value)
          )
        }
        
      ),
      borderStyle: &amp;quot;LIGHT&amp;quot;
    ),
    a!richTextDisplayField(
      label: &amp;quot;Total Cost: &amp;quot;,
      labelPosition: &amp;quot;COLLAPSED&amp;quot;,
      value: a!richTextItem(
        text: &amp;quot;Total Cost:   &amp;quot; &amp;amp; dollar(sum(
          a!forEach(
            items: ri!requestItems,
            expression: if(
              fv!item.isActive,
              fv!item.totalCost,
              0
            )
          )
        )),
        style: &amp;quot;STRONG&amp;quot;
      ),
      align: &amp;quot;RIGHT&amp;quot;
      
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/109019?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 14:51:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0d8da8ec-64cf-429a-bfd9-c1f6e55efc1c</guid><dc:creator>davinar9817</dc:creator><description>&lt;p&gt;So for the grid column, I want it to display what&amp;#39;s being selected in the dropdown in the other interface, purely read-only&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/108973?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 22:39:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c6d8e7ae-5126-4cd8-ba78-86e921face15</guid><dc:creator>Naresh</dc:creator><description>&lt;p&gt;As Mike mentioned what you say and what your code says is different. Are you able to provide full sale code which help us to provide some answer.&lt;/p&gt;
&lt;p&gt;you can also refer Appian documentation for some use case recipes here&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/23.1/SAIL_Recipes.htmlhttps://docs.appian.com/suite/help/23.1/SAIL_Recipes.html"&gt;https://docs.appian.com/suite/help/23.1/SAIL_Recipes.htmlhttps://docs.appian.com/suite/help/23.1/SAIL_Recipes.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Rule Inputs Between Interfaces</title><link>https://community.appian.com/thread/108970?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 21:19:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2c106288-bf4a-49f7-94fa-c581107531ca</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The code sample you&amp;#39;ve posted makes it really unclear what your construct is or what you&amp;#39;re expecting it to do.&amp;nbsp; For the &lt;em&gt;a!gridColumn()&lt;strong&gt;&lt;/strong&gt;&lt;/em&gt; snippet - where and how is that being called from the parent level, and what exactly are you expecting to actually happen by having the &amp;quot;sortField&amp;quot; and &amp;quot;value&amp;quot; being set to the &lt;em&gt;Pokemon Choice&lt;/em&gt; rule input?&amp;nbsp; That doesn&amp;#39;t really resemble how &lt;em&gt;a!gridColumn()&lt;/em&gt; would usually work anyway, whether called as a sub-interface or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>