Hi Community,
I’m working on a requirement where I need to create dynamic columns in read-only grid in Appian and would appreciate some guidance.
I have a database table with the following columns:
ActivityName
ForecastDate (Date field)
ForecastAmount (Decimal)
I want to display a grid where:
Each row represents an ActivityName.
Columns dynamically represent Month-Year values (like Jan-2025, Feb-2025, etc.), based on the date range selected from interface.
Each cell should show the corresponding ForecastAmount for that activity and month, if available.
So the table should “pivot” the data such that ForecastDate drives the column structure dynamically.
Note: Any Date range between 2020 to 2030 can be selected and searched.
What’s the best approach to dynamically generate these month-year columns in an Appian interface?
Should I preprocess the data in an expression rule or CDT before passing it to the grid?
Any examples, ideas, or plug-ins that might help achieve this?
Any help or guidance would be highly appreciated!
Thanks in advance,
Discussion posts and replies are publicly visible
If you plan to use a normal read only grid, you can create any number of columns dynamically.
My approach to such tasks is, to first build a small prototype, assuring myself that I understand the challenge and I have solutions to all the tiny problems making up the whole thing.
E.g. to get the dynamic list of months, you can use code like this:
a!localVariables( local!start: today(), local!end: date(2026, 11, 15), local!numMonths: (12 * year(local!end) + month(local!end)) - (12 * year(local!start) + month(local!start)), local!months: a!forEach( items: enumerate(local!numMonths), expression: a!addDateTime( startDateTime: local!start, months: fv!item ) ), local!months )
Hi Stefan Helzle Thanks for the support so far!
I’ve made good progress — I’m able to:
Generate all dates between the selected date range
Display dynamic Month-Year columns in a grid
Populate each cell with the correct ForecastAmount for its respective ActivityName and Month-Year, using an expression rule
However, I’m facing a performance issue now.
Since the dataset contains millions of records, and each cell in the Month-Year columns is calling an expression rule to get its value, the performance has become very slow.
My Question:
Is there a better or more efficient way to display these Month-Year forecast values without making individual rule calls for each cell?
Would it be better to:
Any suggestions or best practices for handling large datasets with dynamic grids would be really helpful.