Jump to content

Create New Record in a Portal on the Top?


Northbay

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

Recommended Posts

When creating a new record via relationship in a portal, the empty row for the new record is always pushed to the end. Can we, in some way, put the empty row on the top so we don't need to scroll all the way down?

I did search this forum and found a couple topics on this, but, for some reason, all the attached demo files are missing and can't be downloaded.

Can anybody give me an idea or show me a demo file? Thanks so much!

Edited by Northbay
Link to comment
Share on other sites

Create a one-row copy of the portal and apply the filter predicate

IsEmpty ( PortalTO::tablePrimaryID )

You cannot do the opposite, i.e. filter the spare row out; but you could create a relationship that doesn't allow creation, and put a portal into that TO beneath the one-row portal:

Allow Entry (filtered, 1-row, entry)
––––––––––––––––––––––––––––
Don't Allow (n rows, display)

Edited by eos
Link to comment
Share on other sites

Thanks, eos. This is a great idea!

But is it possible to make it within a single portal? Because I use the portal for both creating and selecting record. When I click a portal row within the portal on the left, that specific record will be shown on the right. If I do it with a separate single-row portal, it will be a little bit awkward to show record from different TOs at the same location of the layout.

Link to comment
Share on other sites

If I do it with a separate single-row portal, it will be a little bit awkward to show record from different TOs at the same location of the layout.

No, you cannot do this in a single portal; but if you don't mind having another spare row at the end of your display portal, then use a single “Allow” TO for both portals.

Be aware that the point of the filtered portal is to serve as entry portal only. As soon as you commit the new record, it will disappear, due to the filter condition.

Therefore, you probably should use a script trigger on exit to set the selectionID (for the single-record display) to the ID of the newly created portal record (if there is one, i.e. you really created a new record, rather than exiting without committing!).

Edited by eos
Link to comment
Share on other sites

I do it with a button to create a new record on the portal, sort by date and timestamping the record (no need to show the time stamp field on the portal).

That way the new row shows at the top.

Carlos

Link to comment
Share on other sites

This topic is 3274 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.