Dynamic Reports - Data from Different tables
Another question: Is it possible to call data from two different unrelated tables to fill the report?
Like this:
let xFilter := record(Reports,1).Filter;
let x := (select Payroll where 'Month Ending' = xFilter);
let y := (select 'Business Details' where Id = 1);
x.{
Month_End: format('Month Ending', "DD/MM/YYYY"),
Employee: text('Select Employee'),
Gross: Gross,
WIT: 'Gov Tax',
SS_Employee: 'Employee Contribution',
SS_Employer: 'Employer Contribution'
};
y.{
Biz: 'Business Name'
}
I find that x data stops being added only the y data is visible on the report
3 replies
-
I think this would work....
First you need to put the y formula in a first() function. Then call the y inside the x.{
let xFilter := record(Reports,1).Filter;
let x := (select Payroll where 'Month Ending' = xFilter);
let y := first((select 'Business Details' where Id = 1));
x.{
Month_End: format('Month Ending', "DD/MM/YYYY"),
Employee: text('Select Employee'),
Gross: Gross,
WIT: 'Gov Tax',
SS_Employee: 'Employee Contribution',
SS_Employer: 'Employer Contribution',
Biz: y.'Business Name'
};
-
Just a bit of background. Ninox only outputs the last line, command. So you last command is the JSON that shows the y data. That is why recommended that you put the y data into the x JSON.
-
Thank you and
What a great community.
Content aside
- yesterdayLast active
- 3Replies
- 23Views
-
3
Following
