ACD201 practice question 2 of 15
You're designing an expression rule that needs to retrieve employees from a database for a given department and display their full name concatenated with their role in a list for a dropdown field. Which design approach should you recommend?
Full set: 99 questionsThis approach is the most performant and scalable design. By applying a filter directly within the data query (e.g., using the filter parameter in a!queryRecordType), the database performs the filtering, leveraging its indexing and optimization capabilities. This significantly reduces the amount of data transferred over the network and loaded into Appian's memory. The a!forEach() function is then used efficiently on the smaller, pre-filtered dataset to format the results for the dropdown, which is a standard Appian best practice.
A. This is highly inefficient. Retrieving all employees into memory to filter them using an if() condition inside a loop creates unnecessary server load and is not scalable for large datasets.
B. This is also inefficient. While wherecontains() is a valid function, it operates on data already loaded into Appian's memory. Fetching the entire table from the database first is a performance anti-pattern.
1. Official Appian Documentation
Performance Best Practices
"Data Queries" section: "Filter and sort in the database whenever possible. The database is optimized for operating on large sets of data
so you should let it do the heavy lifting." This directly supports filtering at the source (Option C) and refutes retrieving all data first (Options A and B).
Source: Appian Documentation
"Performance Best Practices".
2. Official Appian Documentation
a!queryRecordType() function
"Parameters" section: The documentation for the filter parameter states its purpose is to filter the data returned by the query. This is the mechanism that enables the efficient approach described in Option C.
Source: Appian Documentation
"a!queryRecordType()".
3. Official Appian Documentation
Query Recipes
"Return a List of Records" section: Examples demonstrate the standard pattern of using a!queryRecordType with an a!queryFilter to retrieve a specific subset of data
followed by data manipulation if needed. This aligns perfectly with the methodology in Option C.
Source: Appian Documentation
"Query Recipes".
Keep practicing
Take the free ACD201 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ACD201 practice questions
- Question 1Your client reported that a form in the application is very slow to load. You investigate…
- Question 3You run a report on different employee transactions by using a View. You encounter the fo…
- Question 5You're developing a record view for a case management system that enables users to upload…
- Question 15You're developing a user input form for a government services application that includes a…
