logo

The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.

Notification

Icon
Error

Options
Go to last post Go to first unread
jhardwick  
#1 Posted : Tuesday, December 15, 2015 11:51:05 PM(UTC)
jhardwick


Rank: Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 1: Random Act of Kindness! Received One Thanks!

Joined: 11/23/2015(UTC)
Posts: 16
United States

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I currently have CustomeProperty1 set as the client name and CustomProperty2 set as their location (city or office vs. home etc.)

The problem is we have a quantity of hosts that don't have any need for subgrouping by location and my original subgroup expression of just "CustomProperty1, CustomProperty2" results in a lot of unnecessary expansion because I end up with the client name as well as an entry for (empty) as the location.

I've spent some time trying to do an IF statement to give two different strings for a subgroup expression depending on the length (or lack of) of the CustomProperty2. The problem I'm having is that I can't give it a concatenation of CustomProperty1,CustomProperty2 in the middle of my IIF. Well, more than likely I'm not encapsulating it correctly.

Quick fix?

This was my latest creation, that doesn't work...

IIF(len(CustomProperty2)>0,(CustomProperty1,CustomProperty2),CustomProperty1)

Scott  
#2 Posted : Wednesday, December 16, 2015 2:17:43 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,862
United States

Thanks: 3 times
Was thanked: 351 time(s) in 303 post(s)
You're really close, you concatenate two values with + instead of a comma. So, within the context of your expression above, it would look like:

Code:

IIF(len(CustomProperty2)>0,(CustomProperty1 + ' ' + CustomProperty2),CustomProperty1)


I also added a space with the two single quotes.
ScreenConnect Team
jhardwick  
#3 Posted : Wednesday, December 16, 2015 5:56:44 PM(UTC)
jhardwick


Rank: Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 1: Random Act of Kindness! Received One Thanks!

Joined: 11/23/2015(UTC)
Posts: 16
United States

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Thank you, but what I was trying to do was more of a conditional second tier group... if CustomProperty2 has a value then group by it, otherwise don't give me the 2nd tier that just says "empty" in the session list.

So that's why I was trying to do the embedded comma between properties one and two if that makes more sense now?
rmmccann  
#4 Posted : Wednesday, December 16, 2015 6:58:59 PM(UTC)
rmmccann


Rank: Advanced Member

Medals: Level 2: Lent a Helping Hand! 10 Thanks!

Joined: 12/16/2012(UTC)
Posts: 184
Location: MN, USA

Thanks: 17 times
Was thanked: 21 time(s) in 18 post(s)
Perhaps you can work with something I set up for my "All Machines" access group?

Quote:

IIF(GuestClientVersion = '', 'Offline', GuestClientVersion)


I have it set to group by client version number. If the machine is offline (and doesn't give a version number), it gets thrown into "offline" otherwise the subgroup will be the version number of the client.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.