How do I get the name of an application when it quits

I’m building a daily life log kind of thing. There for I like to know which applications it quit throughout the day.

When I use %Application%1% i get back the name of application which is active after the application I quit.

Are there any other options?

I found the answer:
If I use %TriggerValue% I get the right value back.