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

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

Recommended Posts

Posted

I am certain this is something basic, but for some reason my brain is just not connecting this morning...

My scenario is this:

POHEAD POLINE POREL POCOMP are tables

They are related linearly -

POHEAD is linked to POLINE using one field - ponum

POLINE is lined to POREL using two fields - ponum and poline

POREL is linked to POCOMP using three fields - ponum, poline, and jobnum

so you have

[POHEAD] -- [POLINE] -- [POREL] -- [POCOMP]

I have a status field on each of those tables.

What I would like to do is have a button on the layout for the POHEAD data that when clicked, sets every status field to CLOSED on all four tables where the PONUM is the same.

Does anyone have a sample script or some advice on how to accomplish this?

Posted

Here is a copy of my rough framework. I have a ton of work still left on it - but to go further, I need to find a way to create a CLOSE PO function and have it close all the associated records for that PO on the other tables.

Import_Tracking_DB.zip

Posted

How about...

Button on POHEAD layout to Close

Set Field[POHEAD::RecordStatus] = "Close"

Go to Related Records in table POLINE

If(Get(LastError)=0)

Replace Field Contents[POLine::POLineRecordStatus] with "Close"

End If

Go to Layout[POHEAD]

Go to Related Records in table POReleases

If(Get(LastError)=0)

Replace Field Contents[POReleases::PORelRecordStatus] with "Close"

End If

Go to Layout[POHEAD]

Go to Related Records in table POReleases

If(Get(LastError)=0)

Replace Field Contents[POReleases::PORelRecordStatus] with "Close"

End If

Go to Layout[POHEAD]

Go to Related Records in table POComponents

If(Get(LastError)=0)

Replace Field Contents[POComponents::POCompRecordStatus] with "Close"

End If

Posted

thanks!

that works like a charm.

I was trying to make it too complex with loops and record counts, ect... I didnt even think of using an error to move on to the next one.

thank you VERY much.

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