T
|
Tim 8/19/2022 |
Hi Stu, I have a similar page with rolling quaterly numbers. For the column headers I insert a code snippet that uses today's date (Datetime.Now) and creates a date label in a format that works for us. Mine is futher complicated by needing to show our fiscal quarters (fiscal year starts July 1), but hopefully the general idea can help you. Here is the code I use in one of the snippets: DateTime d = DateTime.Now; This will display 1Q22. And I have a different snippet for each column and do the math accordingly. Hope this helps. |
![]() |
Sergey Kornilov admin 8/19/2022 |
In regards to dynamic field labels check Stroing field labels and visibility rules in the database article, it can help. |
S
|
Stu1983 author 10/7/2022 |
Sorry only back to this again now. Hadn't thought of code snipets, good idea Tim that works perfect for display, though it doesn't appear when the resulting table is exported to excel. Sergie, I'm struggling with your blog post, I'm following the C# sample at the bottom, lifted code exactly as it appears, just changed the 'settings' table to match my table name. The 'visible' and 'readonly' flags are working but the 'label' and 'required' flags are being ignored. Are the label and required lines of code still valid given the post was back in 2015? GlobalVars.field_labels[t][CommonFunctions.mlang_getcurrentlang()][MVCFunctions.GoodFieldName(data["field"])]=data["label"]; Thanks |