Return a list of session dates based on session quantity

Hi Everyone, 

I currently have a select function in which it returns a list of dates (this function is in a report template ). However, I now need it to be slightly amended so that it will return the date twice in the list if [Session Qty]=2 

Does anyone have any idea on how this can be achieved. 

<<SORT(SELECT(Case Session[Date], AND([Attendance]=”Attended”, (NOT([Session Name]=”Initial Assessment”)),  ([Ref]=[_THISROW].[Case Ref]))))>>

 

0 1 60
1 REPLY 1

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Ben_Rix 

According to this: SELECT() - AppSheet Help

Aurelien_0-1702472877736.png

Here is the indented version for reading easily

<<
SORT(
  SELECT(Case Session[Date], 
    AND(
      [Attendance]=”Attended”, 
      NOT([Session Name]=”Initial Assessment”),  
      [Ref]=[_THISROW].[Case Ref]
    ),
    FALSE
  )
)
>>

 Here is the version improved to save calculation time:

<<
SORT(
  SELECT([Related Cases][Date], 
    AND(
      [Attendance]=”Attended”, 
      NOT([Session Name]=”Initial Assessment”)
    ),
    FALSE
  )
)
>>

 Here is the one-line version for your template:

<<SORT(SELECT([Related Cases][Date],AND([Attendance]=”Attended”,NOT([Session Name]=”Initial Assessment”)),FALSE))>>

 

Top Labels in this Space