Fetching text from select field for blueprint query

Hello everyone,

I have a pages section in table layout like this

    sections:
      overview:
        type: pages
        layout: table
        limit: 50
        headline: Index
        columns:
          title:
            label: Title
            text: "{{ page.title }}"
          dateReference:
            label: Ref. datum
            text: "{{ page.dateReference }}"
          deviationHistoryReference:
            label: Ref. stanje
            text: "{{ page.deviationHistoryReference}}"

The query for deviationHistoryReference is showing me only the values (like N00, N10 etc…), but I’d like to pull the text value to be shown in table layout. Could you guide me to achieve this? :slight_smile:

The subpages have deviationHistoryReference as select field:

fields:
  deviationHistoryReference:
    type: select
    label: Referentno stanje beleške
    help: Selektovati zadnje stanje beleške
    required: true
    width: 1/3
    options:
      - value: "N00"
        text: Početna dokumentacija
      - value: "N10"
        text: Predlog poslat nadležnima
      - value: "N11"
        text: Prihvaćen predlog
      - value: "N12"
        text: Implementiran predlog
      - value: "N19"
        text: Odbijen predlog

You need a page method/page model method that fetches the label for the value from the page blueprint.

Something like:

text: "{{ page.getLabelFor(page.deviationHistoryReference)}}"

And then you create the corresponding method.