<?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>Generic upload documents component</title><link>https://community.appian.com/discussions/f/best-practices/39148/generic-upload-documents-component</link><description>Good day, fellow Appian developers, 
 
 I have a question about best practices regarding managing document uploads conditionally. 
 Scenario: 
 I have about 11 user tasks in a new application. Each task has different business logic regarding what documents</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Generic upload documents component</title><link>https://community.appian.com/thread/148343?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 10:22:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:37c4e7f0-5325-4d60-be43-9cb7b5554180</guid><dc:creator>Megha Ramnani</dc:creator><description>&lt;p data-start="61" data-end="204"&gt;Hi &lt;a href="/members/tomislavf0001"&gt;Tomislav Fuček&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;This is a common scenario, and it&amp;#39;s definitely feasible to design a generic, scalable document upload component. Here&amp;#39;s a recommended approach:&lt;/p&gt;
&lt;p data-start="206" data-end="413"&gt;&lt;strong data-start="206" data-end="238"&gt;1. Use Configuration Tables:&lt;/strong&gt;&lt;br data-start="238" data-end="241" /&gt; Store rules like allowed document types, file extensions, upload limits, and task/organization mappings in a database. This makes your logic data-driven and easy to update.&lt;/p&gt;
&lt;p data-start="415" data-end="549"&gt;&lt;strong data-start="415" data-end="437"&gt;2. Decision Rules:&lt;/strong&gt;&lt;br data-start="437" data-end="440" /&gt; Use decision tables or expression rules to fetch validation logic dynamically based on task and organization.&lt;/p&gt;
&lt;p data-start="551" data-end="751"&gt;&lt;strong data-start="551" data-end="577"&gt;3. Reusable Component:&lt;/strong&gt;&lt;br data-start="577" data-end="580" /&gt; Build a reusable upload interface that takes task name and organization as inputs, fetches config, and enforces rules (e.g., extension checks, single vs. multiple upload).&lt;/p&gt;
&lt;p data-start="753" data-end="868"&gt;&lt;strong data-start="753" data-end="783"&gt;4. Centralized Validation:&lt;/strong&gt;&lt;br data-start="783" data-end="786" /&gt; Create one expression rule to handle all upload validations using the config data.&lt;/p&gt;
&lt;p data-start="870" data-end="971"&gt;This approach improves maintainability and makes it easy to adapt for new organizations or countries.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic upload documents component</title><link>https://community.appian.com/thread/148335?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 08:54:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:56c5a83c-0e60-4efc-a71b-289cb7aee59f</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Feels like this is more about generic validations, than a generic file upload component. A simple approach could be to create a main validation expression, which takes all the relevant parameters as input, and then branches out to separate and more specific validation expressions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>