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

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

Recommended Posts

  • Newbies
Posted

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.

Posted

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

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