Jump to content

Replace command in script fails


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

Recommended Posts

I have several  scripts that I need to end with this stub:

Go to Layout ["Client Data" (Client Data)

Go to Field [Client Data::New Emergency Date; ""]

Replace Field Contents [No dialog]

The objective is to clear out the date field after processing is completed. However, I get a message stating "The previous script step, "Replace Field Contents" could not be completed because of an error". Do you wish to continue with this script?

The objective is to clear out the New Emergency Date fields after processing is complete. 

What am I doing wrong?

TIA

 

Link to comment
Share on other sites

What you have quoted is erroneous. There can be no double quote in the go to field statement.

But delete that line anyway; it isn't  needed. Instead:

Go to Layout ["Client Data" (Client Data)

Replace Field Contents [ No dialog ; Client Data::New Emergency Date ; ""]

 

 

Link to comment
Share on other sites

John,

Another thing to be aware of is that the Replace command works on the found set, and is not transactional. That means, you should verify that you have the correct found set before you use it and if any of the records in the found set are in use by another user, Replace will skip that record - and NOT tell you.

I recommend ANY updates of more than one record use a transactional script.

Read more about how here: https://www.geistinteractive.com/filemaker-transactions/

Link to comment
Share on other sites

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