<?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>Change image dynamically</title><link>https://community.appian.com/discussions/f/general/25356/change-image-dynamically</link><description>I have the requirement where i need to change the image in card layout dynamically. 
 Can someone help</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98894?ContentTypeID=1</link><pubDate>Wed, 03 Aug 2022 06:25:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e9ac463c-7a41-4ec0-9621-e3aa376e0050</guid><dc:creator>Som</dc:creator><description>&lt;p&gt;Thanks Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98863?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2022 15:00:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:91e567d1-9b59-49e5-8edd-37480bf495f0</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!indexes: {1, 2, 3, 4},
  
  local!currentIndex: local!indexes[1],
  
  a!cardLayout(
    contents: {
      a!richTextDisplayField(
        value: &amp;quot;Value: &amp;quot; &amp;amp; local!currentIndex
      )
    },
    link: a!dynamicLink(
      saveInto: {
        a!save(
          local!currentIndex,
          index(
            local!indexes,
            if(
              local!currentIndex = local!indexes[length(local!indexes)],
              1,
              where(local!indexes = local!currentIndex)[1] + 1
            )
          )
        )
      }
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98719?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 19:46:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f9fad153-4bec-46db-ab23-4d17e0509f42</guid><dc:creator>Som</dc:creator><description>&lt;p&gt;Thans mike..Can you please help me with code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98711?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 16:13:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6cbd90fe-e0bc-4525-bd2c-ce9828efd45e</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="84631" url="~/discussions/f/general/25356/change-image-dynamically/98656#98656"]Is it possible if user clicks on that card and then it will change[/quote]
&lt;p&gt;This would be pretty simple just by setting up a link using &lt;em&gt;dynamicLink()&lt;/em&gt; and having it save a new value into a variable storing an identifier for which image you want to be displayed (i.e. the index).&amp;nbsp; It could simply increment the index and, if it&amp;#39;s currently already on the highest one, set it back to 1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98689?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 08:00:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:948d34de-5a2e-4686-8ebf-28cf0f92ca8f</guid><dc:creator>Som</dc:creator><description>&lt;p&gt;Thanks a lot buddy ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98687?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 06:54:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce7b2c5c-3971-4a35-958a-1cd11aa5bbe7</guid><dc:creator>venkyuppala09</dc:creator><description>&lt;p&gt;Hope the below code works for your requirement. This code also changes the image randomly on every 30 seconds without user interaction.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!images: {
    &amp;quot;BOOK&amp;quot;,
    &amp;quot;BUILDING&amp;quot;,
    &amp;quot;BRIEFCASE&amp;quot;,
    &amp;quot;AIRPLANE&amp;quot;
  },
  local!index: a!refreshVariable(
    value: charat(rand(1), 3),
    refreshInterval: 0.5
  ),
  local!selectedImage: local!images[if(local!index &amp;gt; 4, 1, local!index)],
  a!cardLayout(
    contents: {
      a!billboardLayout(
        backgroundMedia: a!documentImage(
          document: a!iconNewsEvent(icon: local!selectedImage)
        ),
        backgroundColor: &amp;quot;#f0f0f0&amp;quot;,
        marginBelow: &amp;quot;NONE&amp;quot;,
        overlay: a!barOverlay(
          contents: {
            a!imageField(
              align: &amp;quot;CENTER&amp;quot;,
              images: {
                a!forEach(
                  items: local!images,
                  expression: a!documentImage(
                    document: if(
                      local!selectedImage = fv!item,
                      a!iconIndicator(&amp;quot;HARVEY_100&amp;quot;),
                      a!iconIndicator(&amp;quot;HARVEY_0&amp;quot;)
                    ),
                    link: a!dynamicLink(
                      saveInto: {
                        a!save(
                          local!selectedImage,
                          local!images[fv!index]
                        )
                      }
                    )
                  )
                )
              },
              size: &amp;quot;ICON&amp;quot;
            )
          }
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98667?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 04:31:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82a8ba33-97a3-4792-b699-c19bebd695f1</guid><dc:creator>deepakg271869</dc:creator><description>&lt;p&gt;you can create a constant which is of multiple type and in that you can add your image document and in interface you can refer this constant to change the image of icon click. on icon, you have to change the index to get the next and previous image.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98658?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 21:48:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e828d7b-c0f6-42e7-80a8-22a6407db841</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;It would also be helpful to get a lot more information about&amp;nbsp;&lt;em&gt;why&lt;/em&gt; you&amp;#39;re hoping to do this, because there may be other similar functionality in Appian that could still achieve your goal in a different way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98656?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 21:43:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:30166909-05b0-41df-baf5-24d3f2bd0c5e</guid><dc:creator>Som</dc:creator><description>&lt;p&gt;ohk mike ..Is it possible if user clicks on that card and then it will change&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98651?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 19:53:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8c74bd69-73fa-4b04-bf7f-543a02c6b4bd</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;There&amp;#39;s currently no functionality that would allow you to perform a save action (or any other manual variable update) just via hover-over.&amp;nbsp; The user would need to click something.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98649?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 18:59:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb93e459-0a62-4777-86ef-3bf04dfb8d4b</guid><dc:creator>Som</dc:creator><description>&lt;p&gt;It should be Triggered by user interaction.&amp;nbsp;Eg: if i hover my cursor on that card layout then it should change&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98648?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 18:57:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:25eae8a0-e5c0-4bcf-ac14-4c6ff3738fdc</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Should this happen automatically or triggered by a user interaction? If automatically, what is your use case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98647?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 18:55:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:788098ee-1273-4b66-b9e9-d864b8338b5b</guid><dc:creator>Som</dc:creator><description>&lt;p&gt;So the requirement is in card layout i need to display image and text.&lt;/p&gt;
&lt;p&gt;Eg: Image1 and text1 needs to be displayed&amp;nbsp;first then it should change to&amp;nbsp;&lt;span&gt;Image2 and text2 then to&amp;nbsp;Image3 and text3 then to&amp;nbsp;Image4 and text4 and finally it should show image1 and text1 and the cycle continues.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note text is short description&amp;nbsp;about image eg: if the image is of Apple then text is Apple.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change image dynamically</title><link>https://community.appian.com/thread/98644?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 18:37:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4fc0a0b5-a58b-47b2-bb40-f535bacaf5cf</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You need to just change the assigned value. More details -&amp;gt; better answers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>