Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Yet another sorting question


This topic is 7993 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Is there any way I can have the "blank" or "new" record in the portal be sorted to the top of the portal? i.e. when you use portals, you can enter new data at the bottom of the list below your actual data. I would like this to default to the top when I open a particular layout, because the users will be adding a new entry every time they have to open that layout.

Posted

The only way I know of is to turn off "allow creation of related records", make a "New Row" button and use it to call a script. The script can create the related record with a default value in the sort field that would put it first (like "" or 0 or something).

Jeff

Posted

Hmmm... I don't think that would work for me. I have "allow creation of related records" turned on because I want the layout that the portal resides on to be able to create records in database that the portal is showing.

Posted

Jeff's solution would not prevent you from adding rows... you'd just have to click a button.

Your button would run an external script in the line items database which would create a related record, and put a number in a field, "LineNumberField". This number would have to be 1 higher than the last entry in that portal (or more... you could just use a simple serial number I guess).

Your relationship would then have to be sorted in DECENDING order of the lineNumberField.

This topic is 7993 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.