September 29, 200520 yr Newbies i have a script that creates either a panel record or a graphic record depending on what value is chosen from a list before the script is activated. when a new record is created an ID number is assigned to the panel or graphic. the last part of the id is a number which signifies where in the order of panels or labels the item in particular falls. the problem is i want the panels and graphics to be linked to different counters but because a serial updates regardless of whether a panel or graphic record has been created i'm having trouble. i'd appreciate some help. thanks.
September 30, 200520 yr Hi KK Create a seperate table with 2 fields (numeric). field 1 NextPanelID, field 2 nextGraphicID Create a cartesian('xtype')relationship between this table and the one where your script to create the record is. In your script you will then be able to set the id field using the relevant next number. eg (loosely) If record type = 'panel' setfield 'recordID',your new relationship::nextpanelID) setfield yournewrelationship::nextpanelID,yournewrelationship::nextpanelID+1 endif If record type = 'graphic' setfield 'recordID',your new relationship::nextgraphicID setfield yournewrelationship::nextgraphicID,yournewrelationship::nextgraphicID+1 endif A script along these lines will get you the next relevant ID and increase the next relevant ID by 1 as nec. All you have to do is set the next ID's manually at first HTH Phil
Create an account or sign in to comment