Page 1 of 1

setocclabel in roster

Posted: March 18th, 2016, 5:18 pm
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

Re: setocclabel in roster

Posted: March 21st, 2016, 11:28 am
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