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

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

Recommended Posts

Posted

Here is a snippet of my calculation contained in the Open Script command...

"&city=Somerville&state=MA&country=United States"

it goes to the browser as

"&city=somerville&state=ma&country=united states"

I wish to preserve the text case as the user types it. How?

Posted

AppleScript preserves the case. It's a little tricky, because it uses the "open location" command, which FileMaker doesn't support; neither does the Finder. But this works (someone else came up with "loginwindow" idea). OS X only.

set theURL to cell "theURL"

tell application "loginwindow" to open location theURL

  • 3 weeks later...
Posted

Thank you, Fenton, for the tip. How do you make this line work?

set theURL to cell "theURL"

I have replaced "theURL" with the address of the calculation field that holds the URL. This address was in the form of Table::FieldName. It didn't work. Do I have to specify the database as well? Or is there another way to specify a cell?

Posted

If it's a related field you either have to use syntax that allows AppleScript to get the related field into a variable first, or go to a layout of the related table (where the field is native), or put the related field on the current layout (can be hidden).

But the simple Table Occurrence Name::Field Name (it's not necessarily the table name) won't work if the field's not on the layout. That's probably what's wrong.

Posted

Thank you.

Just putting the field on the layout did the trick.

However, the "cell" always refers to the first record and not the currently selected one. Would you know if there is a way to specify that the selected record be chosen instead?

Otherwise I would have to resort to creating a new layout displaying only the record of choice which is extremely cumbersome given the large number of URL calls I make.

Posted

Oops. I was only paying attention to the Open part. This assumes you're on the right layout, and the related field is on it.

tell current record of window 1

set theURL to cell "TO::theURL"

end tell

tell application "loginwindow" to open location theURL

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