Sort on relation to same table?

A table has a “chc_parent_id” field, which is related to the pk (“chc_choice_list_id”) of the same table. I tried the following, but it didn’t work, either with inner left or outer left join. This is for records that are listed in a tab panel, table view.

fs.sort('choice_list_id_to_choice_list_parent_id.chc_item_code asc')

where the relation is between choice_list.chc_parent_id to choice_list.chc_choice_list_id.

Is there a way to do this?

Thank you,
Don

Don,

What you describe should work, I just tried in a little sample and wit worked fine.

In what way doesn’t it work?

Btw, which Servoy version are you using?

Rob

Hi Rob,

I just tried it again, and it worked. It looks like I chose the wrong relation – it should have been instead,

fs.sort('choice_list_parent_id_to_choice_list_id.chc_item_code asc')

Sleepy, I guess. Thanks for replying.
Don

6.0.6/1232