We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

Best approach for dynamic UIs?

Hi,
Here is the use case -
There are 3 UIs, according to different conditions on first two UIs
the system has to select ONE UI layout. The layout consists of text boxes,drop downs etc.
Now after the Layout is selected we have to show different questions in that layout,
these questions again has to be selected from a range of say 100 different questions,according to different conditions, the answers for this questions has to be provided inline with it by the user say in text or drop down formats, that is to say some of the questions are like drop down(the users are prompted with the question alongwith a dropdown to select a choice) and some of them like text box.

Also the UI layout can also be changed by the Admin at any given time and the same should be reflected everywhere.


I understand there are different ways to achieve it. But can anybody suggest me the best approach to solve this.

Thanks in Advance..!!!

OriginalPostID-199506

OriginalPostID-199506

  Discussion posts and replies are publicly visible

  • Maybe you create a CDT mapped to DB which holds the configuration for each question including possible answers etc. Include a deleted flag as the admin may not delete the question but just deactivate it. When a question is edited it has to be copied to a new version.

    This is because it would be a bad idea to modify something just while a user fills out the form.

    Then you create some looping logic that creates the UI for each question depending on some type information.

    You have to think of how to validate entered data. Some looping logic will be necessary as well.
  • Thanks for your reply stefan. The question gathering part is fine but what about the UI layout edition? The user can also modify the UI layout or template(not Appian Template - just a UI layout in business perspective), how to incorporate this change?
    The UI layout changes also has to reflect the everywhere.

    Another challenge is even after we use apply components and load the components we have to get and save the user selection and show the aggregates of the selection too.

    Keeping in mind all these, wanted to know the best approach to create a generic and robust solution for the problem in hand.

    Thanks..
  • What do you mean with UI modification? What would a user do? I think a full generic solution will be very complex. Try to reduce that a bit.

    Saving the results should not be a problem. Just put the data into a common data structure. Try to perform some pre-aggregation while saving to have an easier job when you display it.