Skip to main content
September 1, 2024
Question

Best practices (or patterns) for dynamically displaying reusable components

  • September 1, 2024
  • 3 replies
  • 0 views

Hello all, the subject may not be a good summary of what I'm looking for, so here's a bit more context for this posting.

I need to create a set of user interfaces, each of which serves a specific purpose in an application. But a lot of these UIs share similar functionalities (e.g., Approve/Reject decision, Doc upload, Confirmation, etc.) that I'd like to turn into reusable "parts" that will become part of a parent "wrapper" interface object. So, the idea is to always use the parent UI object--this holds common elements such as a page title--and pass in an ID as a rule input, which will be used to determine which of the reusable parts will be displayed within the parent UI.

During my online search on this topic, I found this Community posting and this blog entry by [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] to be somewhat relevant to my needs. But it seems that Appian at some point started preventing users from storing rule/function references in local variables, which would have been a useful feature to have.

I get the sense that I'll probably end up using the a!match() to determine which of the reusable components to display but I'd like to think there's a better/proper way than hard coding a LARGE block of a!match() that contains all of the reusable UI components, all in one object. Any pointers/tips/guidance will be much appreciated!

3 replies

mathieud0001
September 4, 2024

You could try to use applyComponents but the downside is that you can't determine dependencies anymore.

stefanhelzle0001
September 4, 2024

Sure. Don't go that way, unless you spend at least a few months in research and testing! There are so many edge cases and things to consider.

IMHO, trying to build another level of abstraction on top of Appian has a high risk of failing on the long run.

Just my 2 cents ...

mathieud0001
September 4, 2024

Just to be clear, I was not recommending this solution. Merely presenting it as an option (with downsides).

(and also testing my recently unblocked account [emoticon:c4563cd7d5574777a71c318021cbbcc8])