Resorting a portal

Hi,

If I make a change to records in a portal that the sort is based off of, how do I make that portal update to reflect the new sort order? Right now I need to go into layout mode and then reenter browse mode.

You can, make onRecordChange method, that does the sorting again, when you change te record.

right… but method function do I run to execute the sorting and have the screen refresh?

look at your relation:

out of my head:

relation_to_relation.sort(‘companyname asc’)

for example.

I run that, but it doesn’t seem to update anything unless I go into layout mode and back to designer mode.

Can you give me the complete sort-code?

there must be some typo.

The sort field is called sortnumber. The relationship that the portal is based off is called itemtypes_to_itemtypeattributes_col1

here is the code:

itemtypes_to_itemtypeattributes_col1.sort(‘itemtypes_to_itemtypeattributes_col1.sortnumber asc’);

try this:

itemtypes_to_itemtypeattributes_col1.sort('sortnumber asc');

works!

Thanks!