Forum Discussion

AnithaJeevarath's avatar
AnithaJeevarath
Qrew Cadet
10 days ago

Formula Query with options

Hi, Is it possible to sort the results from a formula query. I have a formula query to get list of dates from a table. I would like to get the latest of the returned dates. Is it possible to use options=sortorder-D in the formula query? 

var text Query = "{65.EX.'" & [PBG Number] & "'}";

var number NUM = Size(GetRecords($Query, [_DBID_ACTION_ITEMS]));

If([Active_Ind] = true and $NUM > 0,
ToText(GetFieldValues(GetRecords($QUERY,[_DBID_ACTION_ITEMS]),2))
)

 

  • We have had similar requirements and have resorted to using a summary field on a table-to-table relationship to find the max or min date from all related records and then using this in formula queries. Obviously not ideal.