0

previous event, next event

Hi!

I've a lot of events in the table EVENTS, and I'd like to show in another table, called BAND, the last and the next event for each music band. 

I write in two fields of BAND table:

first(EVENTS['Start date' > today()])

last(EVENTS['End date' < today()]

... but it doesn't work  :-(

....can someone help me?

Thanks

14 replies

null
    • Mconneen
    • 4 yrs ago
    • Reported - view

    @Birillo.. SOO CLOSE... 

    If you have a band view of 

    bandView

    Next Event would be.. 

    nextEvent

    Previous event would be.... 

    (I will let you do that one.   You want the LAST EVENT where the end date is less than today.. or potentially equal to today.. depending on your use case). 

    • Birillo
    • 4 yrs ago
    • Reported - view

    thank you!

    I've written the code suggested but appear "TABLE NOT FOUND: EVENT" .... how is it possible??!?!?! What do I mistake? Sob....

    • Mconneen
    • 4 yrs ago
    • Reported - view

    I thought your table name was "EVENTS" .. with an "S" on the end? 

    • Birillo
    • 4 yrs ago
    • Reported - view

    no no, "S" forgotten here, but written correct in the database....    

    :-(

    • Mconneen
    • 4 yrs ago
    • Reported - view

    Please post screen shot of data model and code.... The error message is saying it cannot find the table named EVENTS. 

    • Mconneen
    • 4 yrs ago
    • Reported - view

    Here is mine..   Events have a composit relationship with Band.. 

    datamodel

    datamodel2

    • Birillo
    • 4 yrs ago
    • Reported - view

    Immagine My table are connected in a different way... is this the problem?

    • Mconneen
    • 4 yrs ago
    • Reported - view

    Hmm.. Doubtful.. Mine was a composit .. but it works the same..   What does the code look like on the Band form for Last and Next event? 

    • Birillo
    • 4 yrs ago
    • Reported - view

    Immagine1Immagine

    there's always "something" not found ... :-/

    • Birillo
    • 4 yrs ago
    • Reported - view

    But Events appears in the left column (even if not visibile in the screenshoot) and Band is the table in which I'm writing the formula

    • Mconneen
    • 4 yrs ago
    • Reported - view

    Try this .. do NOT prefix 'Date termine' with the table name... It is implied that you are refering to the database column.  So rather than 

    Events.'Date termine' ... just use 'Date termine' 

    tryThis

    As for the Band error... Same as above.. strike the Events. prefix...  Second.. please show me where "Band" exists on the left column..   Notice the it looks like it is interpreting the line a "B" and .. based on color coding.  I looked in mine.. it does the same.... 

    • Birillo
    • 4 yrs ago
    • Reported - view

    @Mconneen 

    "Try this .. do NOT prefix 'Date termine' with the table name... It is implied that you are refering to the database column.  So rather than 

    Events.'Date termine' ... just use 'Date termine' "

    Try it, simply empty answer :-(

     

    "please show me where "Band" exists on the left column."

    "Band" doens't appear in the left column becouse is the table into which I'm writing the code

    • Mconneen
    • 4 yrs ago
    • Reported - view

    @Birillio... I have got you close.. but am flying a bit blind here.. Might be time to scheudle a support call.. They are FREE.. and worth while.. 

    https://ninoxdb.de/en/support

    Scroll down.. and click Schedule a Meeting. 

    • Birillo
    • 4 yrs ago
    • Reported - view

    ok, and thank  you a lot for your suggests :-)

Content aside

  • 4 yrs agoLast active
  • 14Replies
  • 2877Views