June 17, 201015 yr 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?
June 18, 201015 yr Author I still cannot get this working properly - any have any examples or tutorial links?
June 21, 201015 yr Author 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
June 21, 201015 yr 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
June 22, 201015 yr Author 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.
Create an account or sign in to comment