December 8, 20178 yr Newbies 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
Create an account or sign in to comment