Hi,
I have an adhoc GQI data source which creates this table:
public GQIColumn[] GetColumns()
{
return new GQIColumn[]
{
new GQIStringColumn("Date"),
new GQIStringColumn("Script Number"),
new GQIIntColumn("SKNs"),
new GQIStringColumn("Code"),
new GQIStringColumn("Title")
};
}
public GQIPage GetNextPage(GetNextPageInputArgs args)
{
var items = _jammDbHelper.GetData();
var rows = new List<GQIRow>();
foreach (var item in items)
{
var cells = new GQICell[]
{
new GQICell() { Value = item.Date.Value.ToString("dd/MM/yyyy") },
new GQICell() { Value = item.ScriptNumber },
new GQICell() { Value = item.ProductNumbers.Count},
new GQICell() { Value = item.ShowCode},
new GQICell(){ Value = item.ShowName},
};
var row = new GQIRow(cells);
rows.Add(row);
}
return new GQIPage(rows.ToArray());
}
And this produces a nice table on the low code app. However what I'd ideally like is 1 table on the UI for each data set where it's grouped by Date. So we only see the date once, but then the rest of the info for that date.
The user can currently do the grouping in 1 table by right clicking the column and choosing group, however this is removed the next time the app is loaded.
So my questions are: Can I force the grouping on that specific column by default so the user doesn't have to click it every time? Or, even better, can I create 4 separate tables from that 1 data source if I apply a group somewhere and create a table for each group?
I'm wondering if this is possible without me having to create 4 different Adhoc data sources and assigning 1 to each table that I want on the UI
Thanks!
Hi Carl,
I think a good option is to make use of an input parameter. In the documentation, there is an example, where a minimum age is used as an input parameter to only show the people older than that minimum age. Analogously, you could use a date as an input parameter to show only the rows of that specific date.
In this way, you avoid having to make 4 different Ad Hoc Data Sources.
You even could go one step further and let that input parameter come from a Feed, for example, a date you select in a dropdown. I would advise however to implement this step by step, so as a first step, you could try with a hardcoded date.
Kind regards,
Joachim