How do I put the item id into a variable?

I want to have a screen where players can look at clues they've picked up in my mystery game. I thought maybe if I put the item id into a variable and then call a common event it could do something like:

If itemId = 1
{ Show some text and a picture of the item}
If itemId = 2
{Show some text and a picture of item 2}

I know I can use the damage formula but my script in there doesn't work. (I already took it out)

I have a work around putting a selectitem call at the start of the common event but I'd prefer if the player can just click on the item and look directly at the information or if they can see something like a list of items and select the one they want to "examine".
Using "this" in the damage formula will get you where you want to go. "this" will refer to the game action. I like the idea of using
$gameVariables.setValue(x, this);
because you'll retain information about which actor used the item, as well as which item was used. But you'd have to do more work later to get at your item ID.

For your purposes you probably want to put in the damage formula
$gameVariables.setValue(x, this._item._itemId);
Which gives you only the item Id.

Then in your common event you can reference the value of variable x to decide which picture and text to show.
I was way off in my idea. I think mine was something like var X = $gamedata(item._itemID);

I'm typing from memory so it is probably even further off than what I originally had! Thank you so much!

Edit: It works but only if I set the scope to something other than none, which means I have to select the actor. Is there a way to make it work without needing to set a scope and thus have to select a user?
So, I believe I've been overthinking what I want to do. I think I can do it using Yanfly's common event menu. It allows you to hide menu items, show pictures, show text, etc.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-put-the-item-id-into-a-variable.86941/