Hello!
I have 18 or so clients, each has a 3-letter acronym ABC, XYZ, etc. Each client has a folder for tickets, but the path used does NOT use the acronym, it uses the full client name like:
/Users/[myUserName]/Documents/MyCompany/Clients/Clients-Frequent/[ClientName]/tickets/
So, a ticket for, say, Acme Corp gets a ClientAcronym variable of ACM, and the Save Dialog needs to be directed to:
/Users/[myUserName]/Documents/MyCompany/Clients/Clients-Frequent/Acme Corp/tickets/
My objective is to find a clever way to save to the correct client ticket folder using the ClientAcronym variable. I currently use the following method using TextExpander snippet expansion which works, but seems a bit sketchy with snippet expansion timing etc.
Each client has a text expansion snippet which is the 3-letter ClientAcronym plus the letter "t", so the snippet:
ACMt
expands to:
/Users/[myUserName]/Documents/MyCompany/Clients/Clients-Frequent/Acme Corp/tickets
When I write the ticket document, I populate the ClientAcronym variable from the contents of the text file I'm writing. I have a macro that:
- Brings up the Save dialog
- Brings up the Go to Path dialog using Command+Shift+G
- Types in the client name acronym using the ClientAcronym variable
- Adds the letter "t"
- Types a space to expand the snippet to the destination path for that client
- Types return
Voila! - the save dialog box is in the correct directory as dictated by the ClientName variable.
I'm thinking I must be missing a basic method of flow control that does:
If ClientAcronym = ACM, then path = .../Acme Corp/tickets/
If ClientAcronym = WIN, then path = .../Widget Industries/tickets/
Etc, etc. for 18 clients...
I know I could make this easier by having the client folder use the acronym as its folder name:
For ANY client the path is:Â Â .../[clientAcronym]/tickets
But I have the thorny problem of transforming the ClientAcronym to the Client Name used in the folder path.
Is there a way to create a table to do the transformation from ClientAcronym to the proper client name, save it as a new variable ClientName, then build the path with that?
OR use a string of If/Then statements?
Any thoughts much appreciated!
Thanks,
- eric