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

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

Recommended Posts

Posted

Hello All,

I wrote a script using script maker that performs a find, but I need it to only find items with the most trecent week. My DB is set up to set items with an ID for each week number, each week ID being higher than the previous. Is there a way I can insert a symbol in the "perform find" part of the script to only return the MAX number of week IDs?

Thanks for the help!

Posted

You can create a self join relationship with the 'X' operator and then have

Set Variable [$LastWeekNum; Max ( SelfJoin::ID )]

Enter Find Mode []

Set Field [iD; $LastWeekNum]

Perform Find []

But, doesnt it make more sense to do a search based off the current date minus how ever many days, rather than setting a field with the last week number?

Posted

No, not really. You have to be in Browse mode to look at data, and you need to store the piece of data you need for the find in a global field or in a variable, as John has shown.

A somewhat simpler procedure, that doesn't require adding a relationship or anything:

Show All Records

Sort Records [ by weekfield, ascending ]

Go to Record [ Last ]

Set Variable [ $max ; weekfield ]

Enter Find Mode

Set Field [weekfield ; $max ]

Perform Find []

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