Jump to content

Filtering AND sorting a portal? (Newbie)


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

Recommended Posts

First of all, I'd like to thank everybody here for being so helpful!

I have been trying to build an invoicing system, and thanks to your help, I've advanced somewhat. I need to know, however how to filter a portal in the invoicing system, AND to sort it. This is the problem:

I have an inventory file, with an article ID. The articles in the inventory file have unique serial numbers (within the same article number) and a "best before" date. When selling products, I'd like to enter the article ID in a global field, and a list of the articles with this ID should show up in the portal, sorted by the best before date... Anyone pls tell me how to do this!

Thanks again!

Link to comment
Share on other sites

Create a field article ID.gl (global text)

Set a new relationship from this to your articles db.

Sort based on best before date.

Add the portal to the layout and then add an article id into the global. You should now see all related articles sorted by best before date.

However, to see all articles as well, you will need a calculation text field in your articles db

Article id & " " &


If you do this and set the relationship in the other database to this, if you type all in the global field you will see all id's.

The start of a multikey field relationship.

Does this help?

Link to comment
Share on other sites

This was just what I was looking for! Thanks, I'll try it at once. At the same time, let me ask you another question. Since the articles sold are unique to the inventory, I need to erase them from the inventory file when the invoice is printed. Is there an easy way to do this? I thought of setting a sold-field in the inventory file, and as soon as the invoice is printed run a script to search for the items sold and erasing them. Is there an easier way to do this?

Link to comment
Share on other sites

... everything works great, until I try to copy the info from one portal to another. I use the following script:


Enter Browse Mode []

Copy [select, "inventory::ArticleNo"]

Go to Field []

Go to Field ["line items::ArticleNo"]

Go to Portal Row [select, Last]

Paste [select, "line items::ArticleNo"]

When using this script (through a button on the portal row), I only manage to paste the contents of the clipboard into the portal... what am I doing wrong?


Link to comment
Share on other sites


make sure the item you are copying is in the portal. It doesn't have to be visible. You can use the size dialog to make it 1 x 1 pixel and place in the corner.

Another way is to use the set field to set a global and work from that.

Avoids the whole copy/paste bit.

Link to comment
Share on other sites

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