Dynamic Column Headers

When creating a Column Layout, is there a way to make the Column Header dynamic to the period it represents rather than a “hard-key” description?

Assuming you refer to forms, then this is only possible with Matrix Boxes, and as you mention some kind of “periods” then this might be usefull for you. Have a look at the Account Schedules Preview (F490) or G/L Balance by Dimension (F408) which shows how to handle this. If it’s a normal table box column, then it’s not possible. If you refer to reports, then of course it possible, simply replace your header label, with a textfield and assign a text variable as needed. Saludos Nils

You can use the CaptionClass property of the column to do that. How To: * Create a function in the table or form which returns a string The returned string should have in the following format: ‘50000,NewCaptionforColumn’ * Enter the name of your function into the CaptionClass property of the column. * Add some code to the function “CaptionClassTranslate(Language : Integer;CaptionExpr : Text[80]) : Text[80]” in the CU 1 like: CASE CaptionArea OF '1' : EXIT(DimCaptionClassTranslate(Language,CaptionRef)); '2' : EXIT(VATCaptionClassTranslate(Language,CaptionRef)); // additional Caption >>>> '50000' : EXIT(CaptionRef); // additional Caption <<<< END; When running the form the system will: Execute your function and hand the returned string over to the CaptionClassTranslate function. The caption Class Translate function will directly return the the portion of the string after the comma and use it as the caption of your column.

Very good idea Thomas, and looks like I had been too fast with my “not possible statement” [Oops!] I had been looking for something simpler, like editing the Caption Property on runtime, like the form caption, but of course the CaptionClass will do the job. Let’s hope that future version might include something like this. Saludos Nils

Don’t you just feel embarrassed when that happens. I feel really stupid when I go like ‘impossible!’ and someone else has a solution for it.

Guys… I think the original question was the Column Layouts in the Account Schedules granule. In short, no, it’s “not possible” to have a dynamic column layout description in the accounts schedule. The closest you can get is using the FY[1], FY[2], etc when you do monthly comparisons. If you push F1 on the Comparison Formula on the column layout, it’ll go into more detail regarding this.

[Oops!] again… should read the threads more carefully…[B)] - and yes Daniel, it’s really embarassing, but i will never forget that suggestion by Thomas and it’s the best method to learn - outside of the comfort zone! You could set up a Year Comparison Column Layout with comparison formulas -1M up to -11M, and always set the filter for December, not ideal at all, but most companies always look at a year comparison… Saludos Nils

Yeah, and imagine how useful it would be to have dynamic captions on buttons !!! Or if you could enable/disable menu items using code !!!

Let’s keep on dreaming, if we behave well, maybe Santa Claus will bring us something new … [:P] Saludos Nils

At least there is something I can look forward to [;)]. Give me the address of your Santa if you get something which I do not get.


Yeah, and imagine how useful it would be to have dynamic captions on buttons !!! Or if you could enable/disable menu items using code !!!
Originally posted by tb@softsys.at - 2006 Mar 10 : 07:18:35

I have done both of these. The button is pretty simple, just put a text box under the button. Se the button as transparent, and then just change the text to what ever you want in code. The menu isn’t ideal, but this works. I did this for Sales Order reports, where the user has a selection of reports to run, but they cna only access osme of the options depending on the type of order, the user permission etc. Originally they had a Menu Item button, with all the reports available, the problem is that most users only needed to access 2 or 3 reports, out of a total of 10. What we did was change to a command button, and then use code to pop up a STRMENU with the desired options. Its not ideal, but it does work.