0

Format a Formulae Field to Show time

Hi All,

Trying to work a formulae field to show the data of a Time field in another table.

My current Formulae is 

(select 'Private Snorkel Booking')[Session = 1].'Tour Time'

Result is a blank formulae field.

Im assuming its because i need Ninox to recognise it as a time. When i change 'Tour Time' to Name, it works by showing the the data in the Name field.

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 6 mths ago
    • Reported - view

    Remember that Ninox always returns an array (even if it is one record) when doing a select. Sometimes Ninox will figure out that you want to return the value in a field, but it is good to get into the habit of telling Ninox how you want to process the array.

    first((select 'Private Snorkel Booking')[Session = 1].'Tour Time')

    If the table has a relationship to ‘Private Snorkel Booking’ then you don’t need the select and then you won’t the array functions at the beginning.

    Like
      • Admin
      • Admin.11
      • 6 mths ago
      • Reported - view

      Fred thank you very much, that worked straight away. Im still learning the Ninox language. What does 'first' mean?

      Like
      • Fred
      • Fred
      • 6 mths ago
      • Reported - view

       It just tells Ninox to grab the first record in the returned array. There are a few others like: last, sum, count, concat, etc. If you follow the link, look for the second subheading called Arrays.

      Like
Like Follow
  • 6 mths agoLast active
  • 3Replies
  • 33Views
  • 2 Following