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

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

Recommended Posts

  • Newbies
Posted

I am trying to create a button that deploys a script that opens a corresponding server folder based on the value in a particular field of the current record card. Here is what I have so far, but I can't figure out why it is not working:

Set Variable [ $jobno ; Value: Project File Server Locations::_4_digit_Job_No. ]

If [ $jobno ≤ "100" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0001 - 0100" of disk "TRG Projects" end tell" ]

Else If [ "100" < $jobno ≤ "200" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0101 - 0200" of disk "TRG Projects" end tell" ]

Else If [ "200" < $jobno ≤ "300" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0201 - 0200" of disk "TRG Projects" end tell" ]

Else If [ "300" < $jobno ≤ "400" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0301 - 0400" of disk "TRG Projects" end tell" ]

Else If [ "400" < $jobno ≤ "500" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0401 - 0500" of disk "TRG Projects" end tell" ]

Else If [ "500" < $jobno ≤ "600" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0501 - 0600" of disk "TRG Projects" end tell" ]

Else If [ "600" < $jobno ≤ "700" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0601 - 0700" of disk "TRG Projects" end tell" ]

Else If [ "700" < $jobno ≤ "800" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0701 - 0800" of disk "TRG Projects" end tell" ]

Else If [ "800" < $jobno ≤ "900" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0801 - 0900" of disk "TRG Projects" end tell" ]

Else If [ "900" < $jobno ≤ "1000" ]

Perform AppleScript [ "tell application "Finder"     activate     make new Finder window    set target of Finder window 1 to folder "Projects 0901 - 1000" of disk "TRG Projects" end tell" ]

End If

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