<?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>Dynamic link Action</title><link>https://community.appian.com/discussions/f/general/29393/dynamic-link-action</link><description>I have a dynamic link in my code and I want to increment the link as soon as we click on that link icon and value should display below that icon. 
 For Example: initially icon link value should be 0 and once I click on that icon link value should get</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Dynamic link Action</title><link>https://community.appian.com/thread/116449?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 09:31:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bb8d2037-e1b6-462d-8406-203487ad33f2</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I do not see any obvious reason for it to not work.&lt;/p&gt;
&lt;p&gt;Could it be that you&amp;nbsp;created the local first without assigning a value (zero)? In Appian, trying to add 1 to NULL evaluates to NULL. To make sure this is not the case, refresh the interface by clicking the &amp;quot;TEST&amp;quot; button.&lt;/p&gt;
&lt;p&gt;Simple example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!finalCount: 0,
  a!linkField(
    links: a!dynamicLink(
      label: &amp;quot;+1&amp;quot;,
      value: tointeger(local!finalCount) +1,
      saveInto: local!finalCount
    ),
    instructions: local!finalCount
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamic link Action</title><link>https://community.appian.com/thread/116448?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 09:12:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a26a514e-0e36-4ff0-a73d-a0b75873c0f4</guid><dc:creator>ankitap9032</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!pagingInfoWell: a!pagingInfo(
    startIndex: 1,
    batchSize: 4,
    sort: a!sortInfo(
      field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;,
      ascending: false()
    )
  ),
  local!pagingInfoImproved: a!pagingInfo(
    startIndex: 1,
    batchSize: 4,
    sort: a!sortInfo(
      field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;,
      ascending: false()
    )
  ),
  local!refresh: a!refreshVariable(
    value: cons!RB_RETRO_REFRESH_COUNT,
    refreshAlways: true()
  ),
  local!retroNotesWell: a!refreshVariable(
    value: a!queryRecordType(
      recordType: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note&amp;#39;,
      filters: {
        a!queryFilter(
          field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5f705a6f-3227-4951-a62a-97cf0e65058c}sprintId&amp;#39;,
          operator: &amp;quot;=&amp;quot;,
          value: ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{e1c08089-7001-47b5-acb3-3bc34ed6f430}id&amp;#39;],
          applyWhen: a!isNotNullOrEmpty(
            ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{e1c08089-7001-47b5-acb3-3bc34ed6f430}id&amp;#39;]
          )
        ),
        a!queryFilter(
          field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{409d2341-43ff-4832-8396-bf239126f79c}type&amp;#39;,
          operator: &amp;quot;=&amp;quot;,
          value: cons!RB_INT_NOTE_TYPE_ONE
        ),
        a!queryFilter(
          field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{ac904959-69dc-4c3a-9546-fe8e7c7e6bab}engagementId&amp;#39;,
          operator: &amp;quot;=&amp;quot;,
          value: ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{8c7bbaa9-a769-43ad-8c66-8f26d232810a}engagementId&amp;#39;],
          applyWhen: a!isNotNullOrEmpty(
            ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{8c7bbaa9-a769-43ad-8c66-8f26d232810a}engagementId&amp;#39;]
          )
        )
      },
      pagingInfo: local!pagingInfoWell
    ).data,
    refreshOnVarChange: local!refresh
  ),
  local!retroNotesImproved: a!refreshVariable(
    value: a!queryRecordType(
      recordType: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note&amp;#39;,
      filters: {
        a!queryFilter(
          field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5f705a6f-3227-4951-a62a-97cf0e65058c}sprintId&amp;#39;,
          operator: &amp;quot;=&amp;quot;,
          value: ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{e1c08089-7001-47b5-acb3-3bc34ed6f430}id&amp;#39;],
          applyWhen: a!isNotNullOrEmpty(
            ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{e1c08089-7001-47b5-acb3-3bc34ed6f430}id&amp;#39;]
          )
        ),
        a!queryFilter(
          field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{409d2341-43ff-4832-8396-bf239126f79c}type&amp;#39;,
          operator: &amp;quot;=&amp;quot;,
          value: cons!RB_INT_NOTE_TYPE_TWO
        ),
        a!queryFilter(
          field: &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{ac904959-69dc-4c3a-9546-fe8e7c7e6bab}engagementId&amp;#39;,
          operator: &amp;quot;=&amp;quot;,
          value: ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{8c7bbaa9-a769-43ad-8c66-8f26d232810a}engagementId&amp;#39;],
          applyWhen: a!isNotNullOrEmpty(
            ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{8c7bbaa9-a769-43ad-8c66-8f26d232810a}engagementId&amp;#39;]
          )
        )
      },
      pagingInfo: local!pagingInfoImproved
    ).data,
    refreshOnVarChange: local!refresh
  ),
  local!whatWentWellSelections,
  local!rbCount: rule!RB_QR_GetCountByFilters(
    retroId: reject(
      fn!isnull,
      append(
        index(
          local!retroNotesImproved,
          &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;,
          null
        ),
        index(
          local!retroNotesWell,
          &amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;,
          null
        )
      )
    ),
    engagementId: ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{8c7bbaa9-a769-43ad-8c66-8f26d232810a}engagementId&amp;#39;],
    sprintId: ri!RB_Sprint[&amp;#39;recordType!{2ed51fe2-f404-4c83-9f98-acc7118706b6}RB Sprints.fields.{e1c08089-7001-47b5-acb3-3bc34ed6f430}id&amp;#39;]
  ),
  local!finalCount:0,

a!forEach(
  items: local!retroNotesWell,
  expression: {
    a!cardLayout(
      contents: {
        a!richTextDisplayField(
          value: {
            a!richTextIcon(
              icon: &amp;quot;thumbs-up&amp;quot;,
              size: &amp;quot;MEDIUM_PLUS&amp;quot;,
              link: a!dynamicLink(
                value: tointeger(local!finalCount) +1,
                saveInto: { local!finalCount,
                  a!save(
                    local!whatWentWellSelections,
                    if(
                      contains(
                        tointeger(local!whatWentWellSelections),
                        tointeger(
                          fv!item[&amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;]
                        )
                      ),
                      remove(
                        local!whatWentWellSelections,
                        wherecontains(
                          tointeger(
                            fv!item[&amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;]
                          ),
                          tointeger(local!whatWentWellSelections)
                        )
                      ),
                      append(
                        local!whatWentWellSelections,
                        tointeger(
                          fv!item[&amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;]
                        )
                      )
                    )
                  ),
                  

                }
              ),
              linkStyle: &amp;quot;STANDALONE&amp;quot;
            ),
            a!richTextItem(
              text: count(
                index(local!rbCount,
                wherecontains(
                  fv!item.[&amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;],
                  tointeger(index(local!rbCount,&amp;#39;recordType!{e41e7a6a-3d1c-489c-b9b3-2393b0c24649}RB Count.fields.{783a6d9f-3247-4c2a-b996-a164b0e3a478}retroId&amp;#39;,null))
                ),null))
            ),
            a!richTextItem(
              text: tointeger(index(
                local!rbCount,
                wherecontains(
                  fv!item.[&amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{5021c120-a5cf-4752-85fe-a3268542bc23}id&amp;#39;],
                  tointeger(
                    index(
                      local!rbCount,
                      &amp;#39;recordType!{e41e7a6a-3d1c-489c-b9b3-2393b0c24649}RB Count.fields.{783a6d9f-3247-4c2a-b996-a164b0e3a478}retroId&amp;#39;
                    ),
                    null
                  )
                ),
                &amp;#39;recordType!{e41e7a6a-3d1c-489c-b9b3-2393b0c24649}RB Count.fields.{f8b4ae26-9b55-4755-937b-439a600b8f1b}count&amp;#39;,
                0
              )) 
            ),
            char(9),
            a!richTextItem(
              text: fv!item[&amp;#39;recordType!{78f32b7c-4150-4c84-baf2-6b2d421a715d}RB Retro Note.fields.{32600b7b-0598-4d83-aee3-e051f27824c7}comment&amp;#39;],
              color: cons!RB_TXT_PRIMARY_COLOR_HEX_CODE,
              size: &amp;quot;MEDIUM&amp;quot;,
              style: &amp;quot;EMPHASIS&amp;quot;
            ),

          },
          align: &amp;quot;CENTER&amp;quot;
        )
      },
      style: &amp;quot;SUCCESS&amp;quot;,
      shape: &amp;quot;ROUNDED&amp;quot;,
      marginAbove: &amp;quot;STANDARD&amp;quot;,
      marginBelow: &amp;quot;LESS&amp;quot;,
      showBorder: false(),
      showShadow: true()
    )
  }
),
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I tried the above code by incrementing to +1 . But it&amp;#39;s not updating&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamic link Action</title><link>https://community.appian.com/thread/116447?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 09:02:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c786c927-3515-4e23-84b4-9a2660f8ce0d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;In general that would require a simple local variable that you initialise with zero. In the dynamic link, you assign the value of the local variable + 1 and save it into local variable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>