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

Changing data in a portal by script


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

Recommended Posts

Posted

I'm working on a receiving db where I'm getting the raw info from an old DOS accounting system (so I can't set everything up right the first time!). I'm currently importing two files into two dbs. I have a header file (PO #, date, name of vendor, etc.) and a line items file.

The line items come to me flagged by a status field as either Open or Complete. Typically, a 100 line PO could dribble in from the vendor over several months, meaning any given line item could go from Open to Complete without affecting the status of its neighboring line items.

I've set up a layout in the header db with a portal that shows all line items associated with a PO#. What I'd like to do is make a button that runs a find script somehow that will allow only the Open items to display in this portal. I tried putting the status field in the portal and doing a find on it manually for "Open". It found them all, but the portal still displays all line items. Apparently the portal ignores what is being found or not found in its related db.

A work-around I thought of is to do a daily find and export of all Open items into a third db, then duplicate my portal layout, except the new portal is related to the third db. That way, my user button to show all line items would go to layout A, and the one to to show only Open items would lead to layout B.

But the daily dump seems clumsy and a pain. Is there a better way?

Steve Brown

Posted

I'd recommend creating a separate relationship, that will show only related Open Line Items. you can do this by creating a multi-key. For example, if the status of a Line Item is either Open or Closed, then create a field in Line Items like this:

(PO_ID]) & (LineItemStatus)

and then in the PO table, create a field that concatenates its PO# with the word 'Open', like this:

(PO_ID) & "Open"

then, from the PO, establish a relationship between these two fields. In a portal for that new relationship, it will show only Line Items from that PO, that are Open.

You could add another relationship for 'Closed' related Line Items, and then place the two portals side by side, with a script that can mark any given Open Line Item as Closed, thereby moving it from the Open portal to the Closed portal.

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