I am trying to dive into Python programming in QGIS. I want to write an expression in my layout that returns some values depending on the current atlas feature.
What I need first, is to get the same value as I can get with @atlas_pagename - then I will use that to query another table and get the data I need. I guess what I need to do is to create some kind of atlas object that follows the atlas in the current layout and then I should be able to read the information I need from that, but I have so far not managed to find anything about that in the manuals I've found.
I have found how to make a new layout or new atlas, but how can I dig into the current one? (Using QGIS 3.6.1)