setocclabel in roster

Discussions about CSEntry
Post Reply
chris.alan.clark
Posts: 3
Joined: May 22nd, 2014, 10:46 am

setocclabel in roster

Post by chris.alan.clark »

I am using CSPro 6.2 and trying to use setocclabel to set some labels for my roster rows. I am currently trying to set the labels in the onfocus of the roster:

PROC M2000
onfocus
numeric x=1;
while x<=2 do
trace(selectedOcc(x));
if setocclabel(M2000(x), selectedOcc(x)) then
trace("true");
else
trace("false");
endif;
inc(x);
enddo;

The trace is returning true, and I can see that it is working, because I see my labels for a split second, but they are almost immediately replaced by the default labels.

Does anyone know anything about this?

Thanks,
Chris
Guest

Re: setocclabel in roster

Post by Guest »

I guess I have solved my problem. There is a property in the .fmf file of the item for a roster called:
UseOccurrenceLabels

If you want to use setocclabel, this property needs to be (unintuitively) set to No, otherwise every time the roster is rendered the occurrence labels from the dictionary seem to overwrite your labels.

I couldn't find anywhere you could change it for an existing roster apart from directly editing the .fmf file; I think you choose it when you first create the roster and that's it.

Thanks,
Chris
Post Reply