<?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>Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/discussions/f/user-interface/40494/displaying-a-loading-banner-while-a-background-process-fetches-a-document</link><description>I have a Rich Text Icon component that is used to download a PDF document. When the user clicks the download link, a background process is triggered using a!startProcess() to fetch the document based on a primary key. The process takes approximately 5</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/thread/154904?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2026 12:12:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3119a5e-58a0-4444-9047-cf659dca5398</guid><dc:creator>vamshik254967</dc:creator><description>&lt;p&gt;Thank you, Mike Schmitt. This solution looks good and I appreciate the suggestion. Although it does not exactly align with my original requirement of displaying a banner message while the document is being fetched, using a `ButtonWidget()` with `loadingIndicator: true` appears to be a good alternative approach to provide user feedback during processing. If I am unable to achieve the expected behavior with the current implementation, I will definitely proceed with this approach.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/thread/154903?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2026 11:45:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f8bb89b1-6f87-44df-9bf3-69a9a58a4742</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I suggest using a ButtonWidget() instead of a Rich Text Link for the part that will generate / retrieve the document - with ButtonWidget you simply set &amp;quot;loadingIndicator&amp;quot; to TRUE, and once clicked, the button will display the &amp;quot;spinning&amp;quot; animation until the process called is complete.&amp;nbsp; It doesn&amp;#39;t exactly show a plaintext message like you said, but it sends the same message (and you can add mouseover text to the original button prompting the user to expect this).&amp;nbsp; After the loading is finished, you can then show a document download link i.e. right below the button containing the user&amp;#39;s download.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/thread/154901?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2026 06:49:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6af60705-25c1-45c4-8fae-9fa50a7a141a</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Got it!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If changing the order of a!save and a!startprocess is not working, can you share a high level code structure with definition of local, banner field showWhen conditions as well as dynamic link saveInto in particular so as to help the current design better&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/thread/154900?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2026 04:47:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4090d9a6-f12c-450d-ac8a-b940bee1c1a9</guid><dc:creator>vamshik254967</dc:creator><description>&lt;p&gt;In this scenario, the a!startProcess() call is responsible for fetching the document. The process model invokes an SAP integration using the provided primary key, retrieves the corresponding document, and then returns the document back to the interface for download. Since the document retrieval depends on the SAP response, the process takes approximately 5&amp;ndash;10 seconds to complete.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/thread/154895?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2026 13:11:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9076a5ed-455b-4651-a3bd-b7e1f6baa541</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Can you elaborate what the startProcess is doing actually? If you can call the query in a!save itself and get the document then what issue are you facing is enabling the documentDownloadLink with docId? I mean can the startProcess be skipped/removed entirey?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/thread/154891?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2026 11:38:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75387e85-7fbb-439e-a04a-418eb32de8c0</guid><dc:creator>vamshik254967</dc:creator><description>&lt;p&gt;I have already attempted to change the order of the actions within the &lt;code&gt;saveInto&lt;/code&gt; parameter, placing the &lt;code&gt;a!save()&lt;/code&gt; before and after the &lt;code&gt;a!startProcess()&lt;/code&gt; call. However, this did not resolve the issue. The local variable still gets updated only after the process execution is completed, rather than immediately when the link is clicked.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Displaying a Loading Banner While a Background Process Fetches a Document</title><link>https://community.appian.com/thread/154890?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2026 11:31:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:599fc9e6-8485-4c56-b518-256433eeed04</guid><dc:creator>Harsha Sharma</dc:creator><description>[quote userid="337437" url="~/discussions/f/user-interface/40494/displaying-a-loading-banner-while-a-background-process-fetches-a-document"]document based on a primary key. The process takes approximately 5–10 seconds to retrieve the document and return it to the interface.[/quote]
&lt;p&gt;If you are retrieving using primary key, then you should investiagte the reason behind 5-10 s in query. Ideally it should be in milliseconds so you should definitely optimise your query.&amp;nbsp;&lt;/p&gt;
[quote userid="337437" url="~/discussions/f/user-interface/40494/displaying-a-loading-banner-while-a-background-process-fetches-a-document"]In the &lt;code&gt;saveInto&lt;/code&gt;, I included both &lt;code&gt;a!startProcess()&lt;/code&gt; and an &lt;code&gt;a!save()&lt;/code&gt; to update a local flag variable that controls the banner visibility. However, I observed that the local variable is not updated immediately when the link is clicked. Instead, it gets updated only after the process started by &lt;code&gt;a!startProcess()&lt;/code&gt; completes[/quote]
&lt;p&gt;saveInto executed saved in the order they appear within saveInto expression. Most likely your startProcess() is followed by the a!save() to update the local variable. Swap their order and it should resolve the execution order.&lt;/p&gt;
[quote userid="337437" url="~/discussions/f/user-interface/40494/displaying-a-loading-banner-while-a-background-process-fetches-a-document"]an alternative approach or recommended pattern in Appian[/quote]
&lt;p&gt;Generally user can download a document in two cliks on form itself. For example, Show a fetch button, when user clicks on it query and retrieve the doc id using primary key and save in in a local variable. When this local variable is populated, show a link &amp;#39;Download&amp;#39; (and hide the &amp;#39;Fetch&amp;#39; button) which allows user to download file having documentDownloadLink in backend()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>