0

How to get a specific value in another table

Hello everyone, I hope you can help me a bit with my project!

I have a table called "Saisons" with some basic information. Then, I have a Dashboard (= a page using the view function with some data from other tables). Now, I'm trying to display the value of a specific field in this "Saisons" table in the page view, based on certain criteria. This is my "Saisons" table:

As you can see in the screenshot, my records depend on dates. In the "Dashboard" page, it is easy to call the record that corresponds to the current date : 

let vartoday := date(today());
actualseason := first(select Saisons where 'Début saison' <= vartoday and 'Fin saison' >= vartoday);

This little code returns the value "8" (= actualseason) because this record matches my date criteria. So far, so good. But, how can I display in another "function" field in the page view the start and date dates of this specific record? So instead of the value "8" (=ID), I need the value "1 sept. 2024" or "30 juin 2025" (values framed in magenta, in the screenshot).

Any idea how to do it?
THANK YOU! 🙏🏼

2 replies

null
    • Fred
    • 12 days ago
    • Reported - view

    Since you have a variable that has the actual record Id (actualseason), you can just add a period after it then you have access to all the fields from that record.

    actualseason.'Début saison'
    or
    actualseason."Fin saison'
    • Stef
    • 9 days ago
    • Reported - view

    Thanks 🙏🏼 it was that easy! it just needed to be known! 😉