Exit code not showing in Action Query


For some reason when I run the following in the presentation debugger everything comes back except the exit code. What am I missing here?

("Instance: " & “inst”, "ActionID: " & id of it as string, "Label: " & name of it, "Issued: " & time issued of it as string, "IssuedBy: " & name of issuer of it, ("Target: " & item 0 of it & " | " & item 1 of it) of (name of computer of it | “n/a”, "Status: " & detailed status of it, "Exit Code: " & exit code of it as string & “%0d%0a”) of results of it) of bes actions whose (name of it contains “ActionName”)


Some actions won’t have an exit code. Exit codes refer to the results from an external command - launched via wait or waithidden.

Actions that never invoke wait or waithidden will not have an exit code. In that case I’m not sure whether it defaults to ‘0’, or (more likely) just doesn’t return a result at all.

You could handle the query via something like

(exit code of it as string | "no exit code")

Thanks Jason,

Maybe I’m not asking my question correctly. I’m looking for the exit code that shows in the console.

There’s got to be a way to extract this in a relevance query no? The other alternative I see is this but it does not work for what I need:


Thu, 25 Oct 2018 14:28:34 +0000
Thu, 25 Oct 2018 15:01:48 +0000

The action failed.
Thu, 25 Oct 2018 14:29:05 +0000
Thu, 25 Oct 2018 14:29:19 +0000

Maybe I need to use another approach to get all of the info I’m looking for? I’m also not finding a way to show the “Not Reported” status that shows in the console.


Ah, I misunderstood.

Hmm I’m seeing the same thing from BES Web Reports. Looks like it might be a bug to me. Can you open a PMR on it?

2 things , 1- not sure how to open a PM
2- the exit code property that I’m talking about is the exit code when you click on a computer from an action in the console. There is an exit code property for the action or action result inspector, that is the one that is coming back null in my relevance query. Perhaps the exit code that is the property of the target in the action is different than the exit code of the action itself?