Hi,
I've one scenario where i need to display data as per the filter selection, and in filter i have a date range field where user can selection up to 2 years range and data would be displayed on grid as per the filter selection.please suggest best way to do display data on grid and to export data on excel.I am using record type, and i have a date column at backend.
Discussion posts and replies are publicly visible
Hi Shahid,
I suggest using record user filters in this case, as they will handle the export to Excel functionality even when filters are applied.
Is there any specific reason you didn’t choose to use the record filters? Without them, you won’t be able to utilize the out-of-the-box 'Export to Excel' functionality for records. Instead, you would need to build a process using the 'Export DSE to Excel' smart service, where you can configure the filter values manually.
Hi Mathurambika M thanks for the quick response, since i need to create and show dynamic columns on grid to show month & year data. Its not possible to create DSE in this case.
May I ask how those dynamic columns are created? Are they custom record fields? You can create a view on the table (the record's data source) and create a DSE for that view.
Again, is there any reason you didn't include record filters?
You cannot dynamically control the number of columns in a CDT or Record. In your case,
Since it for 2 year range, try having 24 columns in CDT or Record for dynamic month display.
In the grid you will be able to conditionally handle the header to show the dynamic month label "Jan-24"
If there is no data for some months, hide those columns using the showwhen condition
Using the export excel functionality
NOTE: This will work only for one reference number. If we try to achieve for multiple, it may introduce complexity and inconsistencies.
have you considered customRecordFields in record object. That can help you have derived values as a column value and same can be downloaded in CSV using the grid component as well.