Hi, i am looking for a way to find the primary user of all workstations based on who logged on the most (Out of the last few logons).
I found a few VERY old articles that got me started but they all had some sort of problem. (one would not let me import the bes file so i had to remove some extra xml coding at the bottom of the bes file to get it to import. one had some bad code in the property that i was able to snip out). Basically what i have now (that is working nearly perfectly) is a property (see relevance below) called “Primary User” and an action that creates a few client settings that contain the logon history (and it does it everytime a user logs in when it becomes relevant again). i think the property reads that and decides the primary user based on number of logons. the problem is that i am having is that when a user logs off it adds “None” to the logon history. so often “None” is the larger number and gets reported as the primary user.
If someone could help me update the following property code below to not report “None” then i would be good to go. but i was also wondering if there was a “Newer” way to do this. or maybe even something that’s built into TEM now.
I am so close to getting this working if i can just figure out how to get it to not report “None”.
Here is the property that i am using now to report the primary user. (this needs to be fixed to not show “None”)
if ((preceding text of first “||” of (it & “||”) of concatenation “||” of (if (exists setting “LogonHistory” of client) then (concatenation “||” of unique values whose (multiplicity of it = (maximum of multiplicities of unique values of preceding texts of firsts “;;” of substrings separated by “::” of (value of setting “LogonHistory” of client as string))) of preceding texts of firsts “;;” of substrings separated by “::” of (value of setting “LogonHistory” of client as string)) else (“No Data - Client Setting Does Not Exist”))) = “none”) then (preceding text of first “||” of (it & “||”) of concatenation “||” of (if (exists setting “LogonHistory” of client) then (concatenation “||” of unique values whose (multiplicity of it = (maximum of multiplicities of unique values of preceding texts of firsts “;;” of substrings separated by “::” of (value of setting “LogonHistory” of client as string))) of preceding texts of firsts “;;” of substrings separated by “::” of (value of setting “LogonHistory” of client as string)) else (“No Data - Client Setting Does Not Exist”))) else (preceding text of first “||” of (it & “||”) of concatenation “||” of (if (exists setting “LogonHistory” of client) then (concatenation “||” of unique values whose (multiplicity of it = (maximum of multiplicities of unique values of preceding texts of firsts “;;” of substrings separated by “::” of (value of setting “LogonHistory” of client as string))) of preceding texts of firsts “;;” of substrings separated by “::” of (value of setting “LogonHistory” of client as string)) else (“No Data - Client Setting Does Not Exist”)))