Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using Set Field in a scripted find

Featured Replies

Is this a bad idea? i can't seem to get it to work.

Solved by Rick Whitelaw

Go to solution

Enter find mode, SetField and perform find? Works .

Post your script.  It is most likely a syntax error, which can be hard to troubleshoot if we can't see it.  A little more detail than "it doesn't work" would be helpful, too.

What is puzzling is that in the file I fixed for you, that is exactly the technique I demonstrated.

 

So you HAVE an example.

 

If you're asking for help you need to be a lot more clear and complete when describing the problem.

 

Including showing your file or your script.

 

Secondly: when fixing your previous file I showed you that you were using the wrong Perform Find script step.

 

You were using Perform Find/Replace - which is NOT the script step you need to use.

So here again - we are going through exactly the same problem we fixed five minutes ago.

post-62898-0-06539700-1372384991_thumb.p

  • Author

To Bruce R:

 

The file you supposedly fixed for me worked fine with only two Set Field parameters in the find. If you will look at the attached file, you will see that adding another Set Field parameter gives an incorrect result (11 when the answer should be 1). It also fails to set the INTAKE ADULT STRAYS field to any value (see layout #9)

 

Attached is the current file - please look at the part of the script below FIND STRAY INTAKES FOR THIS MONTH.

 

I am admittedly no expert at FMP, but I have built several successful solutions (including one using FMP 11). I have been trying to get past this one problem for over 10 days now, and still have no solution.

 

 

PETER ZIPPI FILE copy-3.zip

OK.  I finally found which script you are referring to. 

 

The reason that it doesn't calculate the INTAKE ADULT STRAYS is that you exited the script  in line 6.

  • Author

Sorry, I did not remember to take that Exit out - however. when I did remove it the script gave me a value of 15 for Adult Strays instead of the correct value of 1. Once again I am referring to the script named Intake Data. and the find that falls below the second comment line.

 

If, when you execute the script, then go to Modify Last Find (Command R) you will see that the only find criteria is the 4/1/2013...4/30.2013 in the Intake Date field - the Adult and Stray - At Large fields are not there.

You put the search string in the Repetition field instead of the Calculated result field

Set Field [PETER ZIPPI FILE::KITTEN ~ ADULT STATUS["ADULT"]]

 

should be

Set Field [PETER ZIPPI FILE::KITTEN ~ ADULT STATUS;"ADULT"]

Like Doughemi says.

 

 


More problems. You aren't specifying the correct result for the calculation.

post-62898-0-86439000-1372433575_thumb.p

post-62898-0-60905600-1372433583_thumb.p

post-62898-0-46411300-1372433969_thumb.p

  • Author

OK, now I understand the Set Field must be on a calculated field. HOWEVER, I made the necessary changes, and it gives the right answers BUT, if you got to Layout #9 and execute the script as I have modified it, it places the wrong value in the INTAKE ADULT STRAYS field. If you pause the script before the search for Kitten strays, you get the right value (1), but when you continue the script it puts the right value in the INTAKE KITTEN STRAYS (3), but also puts that value in the INTAKE ADULT STRAYS field.

 

I have attached a newer version of the file with the expanded script.

PETER ZIPPI FILE copy-3.zip

No, you do not understand.

 

The third screenshot shows a problem with one of your field definitions.

 

You really should pay somebody to tutor you. Every attempt to help you takes countless explanations.

  • Author

Bruce R

 

All of your responses show a complete lack of respect. Please do not respond to any of my posts in the future.

  • Solution

Bruce R

 

All of your responses show a complete lack of respect. Please do not respond to any of my posts in the future.

John, while not wanting to participate unduly in a conflict on the forum, your quote above is unfortunate. You may find that nobody will reply to your posts which would be a shame since there are some brilliant and very helpful people here.

Rick.

  • Author

Thanks Rick, I will try to watch this in the future.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.