Hello,
I need to change a label caption on a tabular form when the user selects specific filters. I can test for each filter case, but I can't seem to figure out how to change the label caption for a field within the tabluar form on the fly. I can't use the captioning system since the field name isn't determined until after the user performs a filter selcetion and the form is loaded.
Thanks #-o
Steve
0
Comments
If it was hard to write, it should be hard to understand."
Check this property for captions for Shortcut Dimensions 3,4,5… in let say “Purchase Order Subform”. These are changed on-the-fly.
Then study the codeunit 1.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I create a field that the user can filter on any dimension and that data will fill this field and then the user can use Navi F7 functions to further filter is needed. So this one field can display data from ( Examples, Department, project, area, business group, etc...) all in the same field.
This leaves me with one problem, the caption. When the user selects to filter "AREA" I would like the caption for this field in a tabular form to change and say AREA or DEPARTMENT when DEPARTMENT is selected and so on.
I hope this further explains my dilemma.
Steve :?
Well I will give you an example that should help. I hope.
Choose any control on form and set it's Caption Class (including starting '): Then open the Codeunit 1 and change the function "CaptionClassTranslate". You should add your own CASE option. The function should read:
[-( Now try what happens to your Caption when setting different filters.
Remark1. See that the number before the comma in CaptionClass (in this case 9) identifies the CASE option.
Remark2. Be sure to at least close and open company to refresh CU1.
Remark3. Your caption cannot be longer then 80 chars, so beware of setting too much filters.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Instead of: write your own function that returns a text string you want to display as caption and use it in Caption Class like:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On further thought, aren't you doing something that is very close to what Form 554 does with the 'DimXFilter' fields? These fields can be used to set filters on 'arbitrary' dimensions -- in this case, the dimension specified in the Analysis View record. Just a thought...