Jump to content

FM Script glitch when run from Applescript


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

Recommended Posts

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?

Link to comment
Share on other sites

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)

)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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