Hello,
I've been searching through the board but I didn't seem to find a solution for that. I've placed several fields on a card type page. Depending on the current record I want to change the captions of them. I've tried to use the CaptionClass property with the name of another field so the content of the field is shown as the caption. It works for the first record when the page is being opened but the caption doesn't get updated when switching to the next record. It seems I need to call some kind of UpdateControls function in the OnAfterGetRecord trigger but this function is missing in RTC. Does anybody have an idea for that?
Regards
0
Comments
I would try tu use a Var of Type Text and set IncludeInDataset=TRUE. then work with this var. IF this doesnt work i assume you need to close and reopen the page to achieve that...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Sorry what you trying to do is not possible. The RTC dynamic captions are not as dynamic as in Classic Client, the main reason for this is that we wanted to keep the C/S communication to a minimum for performances reasons.
It might be that you can solve your problem in another way.
Why is it you want to change caption based on the record?
/Marc
Regards
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Sounds like that what you're looking for
Regards,
eganz
The CaptionClass functionality cannot update the caption of a field on a page record-based. That seems to be by design according to what Mr. Hansen mentioned.
unfortunately, i don't remember how to do it and whether it's possible to achieve the same result in the onaftergetrecord.
Moreover, matrix page is not a normal page, you've to investigate it...i just threw my idea, hoping that Marc Hansen enlight us :whistle:
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
The matrix page properly has a validation trigger, when changing this value the trigger is called and the captions are calculated.
I am not sure if you also need to do a currPage.Update to make it work.
In your case you want it updated when you change row. In a row change the Client does not call the Server.
The only pagetype that visits the Server on a row change is the worksheet. I would not recommend using that as it would also decrease the general performance and it is a misuse of the page type, that could course problems for you later on.
I would recommend you looking at using a factbox for showing the additional information, if that is what you want to do.
I agree with you, I won't use a worksheet type page. Aside from the performance reasons, a list would contradict my purpose to place the fields on a card type page. I can't use a factbox though, neither, because the user should have the opportunity to edit the fields just like regular ones.
I have thought about another solution. I could use a subform on the page showing the fields in question. One column of the list contains the caption of the field, the other one the contents. I only fear that the user won't quite understand the concept of this because it's non-standard and hence takes much getting used to, especially because we will have some other subforms showing other values. That could strongly confuse the user.
Regards
But i am not sure why you need a subform, you should be able to put the grid on the page.
Do you have a screen shot that can help me understand the UI confusion?