Our team has been trying to utilize the new badge field in user sources to pull in employee login numbers that we want to use to key into other databases. We can set the field, but we quickly realized that there is no actual way to get each user's badge number from their object data. For example, using system.user.getUser() on a user does not return any badge number value. Any thoughts on if we can access this field?
Right. I've just tested it and I'm seeing the same thing - getUser() doesn't get the badge (Testing on 8.1.33).
A workaround is to query your database using system.db.runQuery(). That has allowed me to pull the badge number from a test user I've just created.
I was able to get the badge using
system.user.getUser() heres what I did:
my_user = system.user.getUser('default', 'aaronrai24') print my_user.get('Badge')
This is the ticket! I had been looking at the API docs, but I had just missed that field. I had presumed that since the dictionary didn't return the badge field, that the pyUser object wasn't properly grabbing it. Thanks!