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

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

Recommended Posts

Posted

I have a text field called subject that I want to use the contents of this field to perform a find. Right now I do it this find and delete manually but I need to have it scripted. Here is the manual process:

Go to record request 1st

Copy contents of field subject

Perform find in field subject paste the contents into the Criteria section and hit enter

Delete retuned records

Show all records

Go to record request 1st

I need for this above manual operation to be scripted but since you cannot paste into a criteria field for a find the script will not work. Has anyone ran into this before or has any ideas on how to work around this problem.

Thanks

Posted

I forget if the SetVariable script step exists in FM8, if it does, it is your answer. Use it to hold your find variable and then

SetVariable ($Variable ; Field)

Enter Find Mode

SetField (Field ; $Variable )

Perform Find (no dialog)

SetVariable ($Variable ; "")

Otherwise, use a global field instead of a variable. In either case, you want to avoid using OS level operations like "cut" and "copy" for in-solution scripts, since these values are handled/stored by the OS, and may affect other user actions in other unrelated applications.

By the way, it looks like you also might want to to call a Loop/Exit Loop If/EndLoop to go through all iterations of your script, until the find/delete action is exhausted.

P.S. - Be very careful with this, you can inadvertently wipe out your entire data set. Back up the whole file before you start playing with loop/setfield/delete type scripts.

Posted

I am also trying to find a solution to a similar problem. My main issue is the text box in which to type the value of the variable. The idea is to create some sort of Quick Search area on the database homepage. However, I do not want the entire page to go into Find mode or New Record mode. Is that at all possible?

For reference: compare it to a Google search box of sorts...

Posted

See here.

http://www.fmforums.com/forum/showtopic.php?tid/195128

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