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.

Constrain Found Set - different behaviour on Windows

Featured Replies

Hello,

In a script I'm using, the data is constrained using the Constrain Found Set feature.

On OSX this works fine, and if there are no results found no records are displayed. However, in Windows, if no results are found the records are displayed before the found set is constrained, which means the results are wrong.

Is there any way around this?

Thanks. :)

I doubt that there is a diff in behavior btw win and mac. Perhaps if you share the code, we can pinpoint what little thing is causing the difference in your circumstances.

  • Author

Hi. Thanks for your reply.

The code is:

Enquiries > Sales Conversion 

Set Error Capture [ On ] 

If [ Get ( WindowMode ) = 0 ] 

Enter Find Mode [  ] 

[ Pause ] 

Else 

End If 

Perform Find [  ] 

Set Field [ salesman details::Conversion Found; Get ( FoundCount ) ] 

Constrain Found Set [ Specified Find Requests: Find Records; Criteria: Contact Data::Sold_Tunit: "Sold" ] 

[ Restore ] 

If [ Get ( FoundCount ) = 0 ] 

Exit Script 

End If 

Set Field [ salesman details::Conversion Sold; Get ( FoundCount ) ] 

Set Field [ salesman details::Conversion Percent; salesman details::Conversion Sold / salesman details::Conversion Found * 100 ]

The "If [ Get ( FoundCount ) = 0 ]

Exit Script

End If" was my attempt to fix it, but it didn't work!

Edited by Guest

not the most elegant script, but this step raises a question:

Criteria: Contact Data::Sold_Tunit: "Sold" ]

[ Restore ]

are you in the right context for this field? It doesn't match the other TO "salesman details".

  • Author

The salesman details and Contact Data tables are linked, if that's what you mean?

The script works absolutely fine on OSX and on Windows unless there are no results returned, which is why I'm a bit confused.

  • Author

Double post.

Edited by Guest

What version of FMP are you running - there is conflicting information in your avatar.

FMP 7 was quite "buggy".

  • Author

A combination of both really, but I'm programming this script in FM7.

Sorry. :)

Have you applied the latest patches to the application, on both platforms?

  • Author

No. Do you recommend doing this?

I'd rather be sure it isn't a problem with the script before I update the program as we run Filemaker on multiple machines and this may cause other problems.

Do you recommend doing this?

Most certainly.

You could update one Windows machine and see if that fixes the problem.

  • Author

Hi.

I'll have to do the update tomorrow as all of the Windows machines are in use. However I can test my script tonight on Filemaker 9 to see if the problem persists.

I'll post back here with details.

Many thanks for all of your help. :)

  • Author

Just an update. The script works fine in Filemaker 9, so obviously it's a bug in 7. I'll install the updated on the Windows machines tomorrow and post the details.

  • Author

I've just updated a Windows machine to 7.3 and the script works fine now.

Many thanks for all your help. :)

7.01 was extremely buggy. Anybody using it should most definately upgrade to 7.03

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.