0

Sort by linked table/field

HI All,

I have done a search for some info on my issue, but can't find a solution, so am posting this topic.

What I need to do, is pull rows from a table with certain criteria, and also filter by a linked table.
This works fine, but when I try to sort by a field in the linked table, it does not sort correctly, and instead sorts by a field in the main table.

Here is the function I am using:
=NL("Rows","job-hdr",,"job-dept",$C$2,"address-code",$C$6,"Link=","job-col","job-id","=job-id","+col-date",$C$5)So as you can see, I am pulling rows from "job-hdr" where the "job-dept" and "address-code" fields are equal to my options at run time.
I have then linked to the "job-col" table using "job-id" as the link, and have applied a filter also on "col-date".
$C$5 is a date range, and it is pulling only jobs with a col-date in that range, but it is not sorting them by this field.
It is in fact sorting them by a field called "job-disp" which is in the main "job-hdr" table.

Do I need to return the job-hdr rows, and then do another NL on that set of results and filter from there? If so, how is this achieved.

Thanks, Eds

8 comments

Please sign in to leave a comment.