Skip to main content
saahilm0001
May 27, 2021
Question

Best way of creating a query?

  • May 27, 2021
  • 7 replies
  • 0 views

Hi all,

In Appian, we can create queries directly in a UI, in local variables, or in a process model using script tasks, through rules, and also in node inputs as well. What is the best way to handle them? have come across one such question which I was not sure of.

    7 replies

    stefanhelzle0001
    May 27, 2021

    I typically wrap each query into a separate expression for ease of debugging and testing. Then I use this wherever necessary.

    In interfaces we typically use local variables to store the output. If data is needed in a process, then do that in a script task.

    Does that answer your question?

    dhananjayk3480
    May 27, 2021

    There is nothing best but I would say most efficient way is to create rule due to following reasons

    1. One place change - Change in the rule reflects at all dependent objects
    2. Reusability - Can be used at many places

    saahilm0001
    May 27, 2021

    Thank you Stefan and Dhananjay, does querying directly in an interface and the one from the script task have a different impact on performance?

    dhananjayk3480
    May 27, 2021

    I guess it would be the ways how it execute, like if its under rule then it first render rule and then parent rule, if its directly on interface it does not do so like that.

    Could you please tell what exactly you're looking for?

    saahilm0001
    May 27, 2021

    The scenario is to show a read-only grid based on a query. The query can be passed from a script task to UI or directly call in the interface under the data parameter. What should be best considering performance?