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
KBrickler  
#1 Posted : Monday, February 15, 2016 5:12:04 PM(UTC)
KBrickler


Rank: Newbie

Joined: 3/10/2015(UTC)
Posts: 6

I have been trying to create a nested subgroup expression. All but one part is working.

First is sort by Company Name (Working) - CustomProperty1
Next is sort by system type (Working) - IIF (GuestOperatingSystemName LIKE '*Server*', 'Servers', IIF (GuestOperatingSystemName LIKE '*Mac*', 'Macs', IIF (GuestOperatingSystemName LIKE '*Windows*', 'Workstations', 'Other')))

Last is sort by OS version (Issue with Mac) IIF (GuestOperatingSystemName LIKE '*Windows XP*', 'Windows XP', IIF (GuestOperatingSystemName LIKE '*Windows Vista*', 'Windows Vista', IIF (GuestOperatingSystemName LIKE '*Windows 7*', 'Windows 7', IIF (GuestOperatingSystemName LIKE '*Windows 8*', 'Windows 8', IIF (GuestOperatingSystemName LIKE '*Windows 10*', 'Windows 10', IIF (GuestOperatingSystemName LIKE '*Server 2003*', 'Server 2003', IIF (GuestOperatingSystemName LIKE '*Small Business Server 2008*', 'Small Business Server 2008', IIF (GuestOperatingSystemName LIKE '*Small Business Server 2011*', 'Small Business Server 2011', IIF (GuestOperatingSystemName LIKE '*Server 2008 R2*', 'Server 2008 R2', IIF (GuestOperatingSystemName LIKE '*Server (R) 2008*', 'Server 2008', IIF (GuestOperatingSystemName LIKE '*Server 2012 R2*', 'Server 2012 R2', IIF (GuestOperatingSystemName LIKE '*Server 2012*', 'Server 2012', IIF (GuestOperatingSystemName LIKE '*Server 2016*', 'Server 2016', IIF (GuestOperatingSystemName LIKE '*10.6*', 'Snow Leopard', IIF (GuestOperatingSystemName LIKE '*10.7*', 'Lion', IIF (GuestOperatingSystemName LIKE '*10.8*', 'Mountain Lion', IIF (GuestOperatingSystemName LIKE '*10.9*', 'Mavericks', IIF (GuestOperatingSystemName LIKE '*10.10*', 'Yosemite', IIF (GuestOperatingSystemName LIKE '*10.11*', 'El Capitan', 'Other')))))))))))))))))))

All of the Windows systems are sorting correctly, but none of the Mac's are. The subgroup under Macs only shows "Other" and puts all systems in that. My guess is that the . (10.8) is the issue but I only have a basic understanding of the expressions and have not been able to resolve this. Any help and explanations to improve my knowledge would be greatly appreciated.

Below is the full expression that is in the All Machines Subgrouping.

CustomProperty1, IIF (GuestOperatingSystemName LIKE '*Server*', 'Servers', IIF (GuestOperatingSystemName LIKE '*Mac*', 'Macs', IIF (GuestOperatingSystemName LIKE '*Windows*', 'Workstations', 'Other'))), IIF (GuestOperatingSystemName LIKE '*Windows XP*', 'Windows XP', IIF (GuestOperatingSystemName LIKE '*Windows Vista*', 'Windows Vista', IIF (GuestOperatingSystemName LIKE '*Windows 7*', 'Windows 7', IIF (GuestOperatingSystemName LIKE '*Windows 8*', 'Windows 8', IIF (GuestOperatingSystemName LIKE '*Windows 10*', 'Windows 10', IIF (GuestOperatingSystemName LIKE '*Server 2003*', 'Server 2003', IIF (GuestOperatingSystemName LIKE '*Small Business Server 2008*', 'Small Business Server 2008', IIF (GuestOperatingSystemName LIKE '*Small Business Server 2011*', 'Small Business Server 2011', IIF (GuestOperatingSystemName LIKE '*Server 2008 R2*', 'Server 2008 R2', IIF (GuestOperatingSystemName LIKE '*Server (R) 2008*', 'Server 2008', IIF (GuestOperatingSystemName LIKE '*Server 2012 R2*', 'Server 2012 R2', IIF (GuestOperatingSystemName LIKE '*Server 2012*', 'Server 2012', IIF (GuestOperatingSystemName LIKE '*Server 2016*', 'Server 2016', IIF (GuestOperatingSystemName LIKE '*10.6*', 'Snow Leopard', IIF (GuestOperatingSystemName LIKE '*10.7*', 'Lion', IIF (GuestOperatingSystemName LIKE '*10.8*', 'Mountain Lion', IIF (GuestOperatingSystemName LIKE '*10.9*', 'Mavericks', IIF (GuestOperatingSystemName LIKE '*10.10*', 'Yosemite', IIF (GuestOperatingSystemName LIKE '*10.11*', 'El Capitan', 'Other')))))))))))))))))))

Ben B  
#2 Posted : Monday, February 15, 2016 6:38:30 PM(UTC)
Ben B


Rank: Administration

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

Joined: 10/2/2015(UTC)
Posts: 329

Thanks: 1 times
Was thanked: 71 time(s) in 63 post(s)
The GuestOperatingSystemName field is populated with 'Mac OS X' for all of your OS X machines, which is why all OS X machines are routed to the Other subgroup.

To make this work, you should replace GuestOperatingSystemName with GuestOperatingSystemVersion for the nested OS X expressions:

CustomProperty1,
IIF (GuestOperatingSystemName LIKE '*Server*', 'Servers',
IIF (GuestOperatingSystemName LIKE '*Mac*', 'Macs',
IIF (GuestOperatingSystemName LIKE '*Windows*', 'Workstations', 'Other'))),
IIF (GuestOperatingSystemName LIKE '*Windows XP*', 'Windows XP',
IIF (GuestOperatingSystemName LIKE '*Windows Vista*', 'Windows Vista',
IIF (GuestOperatingSystemName LIKE '*Windows 7*', 'Windows 7',
IIF (GuestOperatingSystemName LIKE '*Windows 8*', 'Windows 8',
IIF (GuestOperatingSystemName LIKE '*Windows 10*', 'Windows 10',
IIF (GuestOperatingSystemName LIKE '*Server 2003*', 'Server 2003',
IIF (GuestOperatingSystemName LIKE '*Small Business Server 2008*', 'Small Business Server 2008',
IIF (GuestOperatingSystemName LIKE '*Small Business Server 2011*', 'Small Business Server 2011',
IIF (GuestOperatingSystemName LIKE '*Server 2008 R2*', 'Server 2008 R2',
IIF (GuestOperatingSystemName LIKE '*Server (R) 2008*', 'Server 2008',
IIF (GuestOperatingSystemName LIKE '*Server 2012 R2*', 'Server 2012 R2',
IIF (GuestOperatingSystemName LIKE '*Server 2012*', 'Server 2012',
IIF (GuestOperatingSystemName LIKE '*Server 2016*', 'Server 2016',
IIF (GuestOperatingSystemVersion LIKE '*10.6*', 'Snow Leopard',
IIF (GuestOperatingSystemVersion LIKE '*10.7*', 'Lion',
IIF (GuestOperatingSystemVersion LIKE '*10.8*', 'Mountain Lion',
IIF (GuestOperatingSystemVersion LIKE '*10.9*', 'Mavericks',
IIF (GuestOperatingSystemVersion LIKE '*10.10*', 'Yosemite',
IIF (GuestOperatingSystemVersion LIKE '*10.11*', 'El Capitan', 'Other')))))))))))))))))))
ScreenConnect Team
KBrickler  
#3 Posted : Monday, February 15, 2016 7:11:18 PM(UTC)
KBrickler


Rank: Newbie

Joined: 3/10/2015(UTC)
Posts: 6

That worked. Thanks

The groups list alphabetically is there anyway to control the order, other then changing the display name?

Example:

Have them list in version order instead of name. Similar to how the query is ordered?

IIF (GuestOperatingSystemVersion LIKE '*10.6*', 'Snow Leopard',
IIF (GuestOperatingSystemVersion LIKE '*10.7*', 'Lion',
IIF (GuestOperatingSystemVersion LIKE '*10.8*', 'Mountain Lion',
IIF (GuestOperatingSystemVersion LIKE '*10.9*', 'Mavericks',
IIF (GuestOperatingSystemVersion LIKE '*10.10*', 'Yosemite',
IIF (GuestOperatingSystemVersion LIKE '*10.11*', 'El Capitan',
'Other'
Ben B  
#4 Posted : Monday, February 15, 2016 8:11:06 PM(UTC)
Ben B


Rank: Administration

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

Joined: 10/2/2015(UTC)
Posts: 329

Thanks: 1 times
Was thanked: 71 time(s) in 63 post(s)
There's currently no way to override the lexicographic ordering of session subgroups. You would need to update the display names to force the desired ordering.

I added your request to our feature request portal:
http://screenconnect.use...-lexicographic-ordering/
ScreenConnect Team
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.