<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I'm looking through the documentation and there is this example:</p>
    <div class="section" id="layout-functions">
      <h3><a class="toc-backref"
href="https://docs.qgis.org/3.10/en/docs/user_manual/working_with_vector/expression.html#id24"><span
            class="section-number">14.2.2.13. </span>Layout Functions</a></h3>
      <p>This group contains functions to manipulate print layout items
        properties.</p>
      <div class="wy-table-responsive">
        <table class="colwidths-auto docutils align-default">
          <thead>
            <tr class="row-odd">
              <th class="head">
                <p>Function</p>
              </th>
              <th class="head">
                <p>Description</p>
              </th>
            </tr>
          </thead>
          <tbody>
            <tr class="row-even">
              <td>
                <p>item_variables</p>
              </td>
              <td>
                <p>Returns a map of variables from a layout item inside
                  this print layout</p>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <p><strong>An example:</strong></p>
      <ul>
        <li>
          <p>Get the scale of the ‘Map 0’ in the current print layout:</p>
          <div class="highlight-default notranslate">
            <div class="highlight">
              <pre><span></span><span class="n">map_get</span><span class="p">(</span> <span class="n">item_variables</span><span class="p">(</span><span class="s1">'Map 0'</span><span class="p">),</span> <span class="s1">'map_scale'</span><span class="p">)</span>
</pre>
            </div>
          </div>
        </li>
      </ul>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">How do I find out how to get the text
      value of the layout item "Filename" on the current print layout? <br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 4/08/21 2:40 pm, Patrick Dunford
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:a680851a-f408-d111-8ccc-ff6da5b33348@gmail.com">It is
      just an ordinary text field on a composer layout I think. I don't
      use the atlas functionality.
      <br>
      <br>
      On 4/08/21 10:19 am, Nyall Dawson wrote:
      <br>
      <blockquote type="cite">On Wed, 4 Aug 2021 at 06:17, Patrick
        Dunford <a class="moz-txt-link-rfc2396E" href="mailto:enzedrailmaps@gmail.com"><enzedrailmaps@gmail.com></a> wrote:
        <br>
        <blockquote type="cite">Good day
          <br>
          <br>
          I am wishing to create a value in a field on a composer layout
          that
          <br>
          reads the value of another field on the layout and calculates
          a value to
          <br>
          be displayed.
          <br>
          <br>
          For example, I have an existing field called Filename on the
          layout and
          <br>
          in a python script running in the main window console, I have
          this code
          <br>
          that reads the value of the Filename field as follows:
          <br>
          <br>
          layoutTitle = "Landscape 16:9 Header Nav Copyright Filename
          2021"
          <br>
          <br>
          project = QgsProject.instance()
          <br>
          projectLayoutManager = project.layoutManager()
          <br>
          layout = projectLayoutManager.layoutByName(layoutTitle)
          <br>
          <br>
          fileNameLabel = layout.itemById('Filename')
          <br>
          fileNameText = fileNameLabel.text()
          <br>
          <br>
          <br>
          Obviously I am hoping that doing this from a field within the
          layout
          <br>
          that reads another field on the same layout will be much
          simpler than
          <br>
          the above. How exactly would I achieve that?
          <br>
        </blockquote>
        Just to clarify -- by "field" do you mean "a field value from
        the
        <br>
        atlas layer", or "a text label item"?
        <br>
        <br>
        Nyall
        <br>
      </blockquote>
    </blockquote>
  </body>
</html>