How to link a specific variable value to a PDF file?

I have a certain value of a variable obtained from an external source. Depending on this value, a specific PDF file should be displayed on the screen. For example, if the variable value is 1, the file named 1.PDF should be opened. Or if the variable value is 7, the file 7.PDF should be opened accordingly. Help me solve this puzzle. I cannot set dependencies anywhere in the block window. The PDF files are located in the assets.

I would try this: