Expand my Community achievements bar.




Level 3
I was trying to add the ability for a user to add a City name
to their profile in the CustomRoster example. I tried to set the
following cSession.userManager.setCustomUserField but I am sure I
called it wrong. I was setting the city name from a text input box

Then I was trying to display it in the mx:list by adding to
the line - return uDesc.displayName+", "+role+",

What is the correct procedure to set and then call?

1 Accepted Solution


Correct answer by
Former Community Member
And here's the event class that goes with it.

View solution in original post

6 Replies


Former Community Member

For adding a new field, you need to first register the custom
field by calling cSession.userManager.registerCustomUserField API
and then you should call setCustomUserField to set the value of
that field. Once this is done, you can then get the value from

Hope this helps.


Hironmay Basu


Level 3
thanks, but I cannot still get the syntax right. I am trying
to test it by changing the CustomRoster example slightly so when
the user role changes the new field is registered and set. I then
call by using return uDesc.displayName+", "+role+",
"+uDesc.customFields['testfield']; Could you please help with the
correct syntax.

Sorry for my ignorance.


Former Community Member

Hi there,

Unfortunately, you've stumbled into an area of code that
isn't supported yet. This is our bad - we should have removed this
before this release, since it was pretty buggy, and we ran out of
time to get it done properly for public beta. For a little
guidance, if it's marked @private, it's probably not ready for
prime-time :). Sorry for the confusion - We'll definitely get this
fixed for the next beta drop.

So, back to the problem at hand, what I'd suggest for now is
to create a separate shared model, which is indexed by userID, and
is set to userDependentItems=true, meaning that details are
retracted as users leave the room. I'll post an example in a



Former Community Member
Here's an example model class that can work for this purpose


Correct answer by
Former Community Member
And here's the event class that goes with it.
The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 81, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 81, column 5] ----