2. For the executables 3rd argument I am using this script, that simply identifies if the userid admin exists or not on a system.
USERID="admin" && /bin/id $USERID 2>/dev/null ?&& [ $? -eq 0 ] && echo "$USERID User found" || echo "$USERID User not found"
The instructions in the link I provided above indicate to create an Inventory query to look-up your devices/computers while showing your custom fields. You can also add the custom filed into your query criteria.
Maybe I am doing it wrong but I just can't get this running. All I need is a list of computers and see if admin exists or not in that list.