Jump to content
Server Maintenance This Week. ×

Randomly Inserting and Moving Rows in a Portal


YogiND

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

Recommended Posts

  • Newbies

Is it possible to randomly insert a row in a portal at any point, including between two populated rows?

For example, I am working on a recipe database and have created a one to many relationship between the ingredients used in a recipe and ingredients (inventory ultimately).

Let's say I have all of my ingredients entered and I discover I forgot to enter something and I want to enter the new ingredient between two other populated rows. I would like to create a button to insert a new row above the row the cursur is current located. Is this possible?

Also, can I physically drag and drop a row to a different order in the portal? 

Thank you,

YogiND

 

Link to comment
Share on other sites

You'll need to have a (number) field to sort on, and apply the sort to your portal or its relationship.
Your "insert" script would then take the active row's sortField and e.g. subtract .5 and etc.

It's possible to achieve this effect using drag and drop via script triggers. There are a couple of demos floating around... here's one.

Might be a lot to bite off if you're new, but you'll have to be the judge. Welcome to the forums.

Link to comment
Share on other sites

  • Newbies

Fitch, 

Ah, yes, I think I am in this project way more than I would like, but...

Is the number field placed on the portal line? Will I have the field auto-enter a value? 

How do I "apply the sort" to the portal?

Thank you for your patience and assistance!

Link to comment
Share on other sites

The field would be in the related table. You'd need it in the portal if you want to manually edit it. Otherwise it doesn't have to displayed.

Go to layout mode and double-click the portal to see its options (of which Sort is one).

Link to comment
Share on other sites

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