Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color setting based on OSUser

Hi All,

I'm trying to set the color of bars in a graph when a user logs in to show ones that relate to them, but with no selections made.

I've got a version of this function working, but it requires a user to make a selection before this happens. What I'd like is to have this happen on login without any macros (as the client version needs to be Ajax).

Any thoughts?

Thanks

Gavin

8 Replies
Not applicable
Author

Maybe some OnOpen trigger?

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

try modifying the background color property in your expression with:

=pick(WildMatch(OSUser(), 'Domain\User1', 'Domain\User2', 'Domain\User3'), Green(), Red(), Yellow())

You just have to replace the users and the colors you wish to use,

see the attached example,

regards

Not applicable
Author

Thanks, I think that the trigger may work, but not sure what to use for it.

Jaime, the example you posted is helpful, but what I want to do is color just one of the bars (say Green) and the rest stay blue.

So if there was a bar chart that showed division and I had 5 divisions, I only want the division I belong to be color changed, the rest stay as they were.

thanks

Gavin

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

then you have to add the condition for changing just one bars, besides the condition for the color depending on OSUser():

if(CONDITION_IS_TRUE,

pick(WildMatch(OSUser(), 'Domain\User1', 'Domain\User2', 'Domain\User3'), Green(), Red(), Yellow())

)

this way, the bar will change color only if the condition is fulfilled,

regards

maxgro
MVP
MVP

1.png

Not applicable
Author

Hi massimo

Can you post up the qvw?

Many thanks

Gavin

maxgro
MVP
MVP

is already attached to my prev post

Not applicable
Author

Hi Massimo,

Yes it was (my mistake) I was looking through a mobile device that didn’t pick-up the attachment.

Many thanks

Gavin