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

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

Recommended Posts

Posted

I have an Applescript that creates a new record in a db, and invokes an FM script ("Edits") to do certain edits on the new record.

It has worked fine for months. Today I created a new sub-script, ProperCaps:

>> If (Exact(Status(CurrentFieldContents), Upper(Status(CurrentFieldContents))) or Exact(Status(CurrentFieldContents), Lower(Status(CurrentFieldContents))) )

>>>> Proper(Status(CurrentFieldContents))

>> End If

(which simply applies the proper name capitalization function if the text is either all upper or all lower case)

At the end of Edits, I added a series of steps like this:

>> Go to Field["firstname"]

>> Perform Script[subscripts, "ProperCaps"]

This latest series of edits has absolutely no effect when Edits is invoked by the Applescript, yet it works right when I run Edits manually from the scripts menu! Everything else in the Edits script continues to work fine.

I'm mystified. Am i misusing "current field" somehow?

Posted

This IF is missing a result. It should (probably) be

If (

Exact(Status(CurrentFieldContents), Upper(Status(CurrentFieldContents))) or Exact(Status(CurrentFieldContents), Lower(Status(CurrentFieldContents))),

Proper(Status(CurrentFieldContents)),

Status(CurrentFieldContents)

)

Posted

My apologies - what I should have posted originally is:

If ["Exact(Status(CurrentFieldContents), Upper(Status(CurrentFieldContents))) or Exact(Status(CurrentFieldContents), Lower(Status(CurrentFieldContents)))"]

[color:"red"]Set Field ["Proper(Status(CurrentFieldContents))"]

End if

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