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

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

Recommended Posts

Posted

I'm well aware of the need to Commit Records in FMP9 after a scripted routine which creates new records and sets fields within those records. However, I've come across a situation where, despite that command being made both immediately after setting fields, and again also at the very end of the scripted routine, the new records don't make their appearance in the expected portal, nor in another layout which is specifically for the table that should be for those records. However, if I quit the file or FMP and relaunch, then the fields are there exactly where they should be without any further action.

If you're with me so far, then let me spell out some more of the specifics.

In this solution I'm making use of Matt Petrowsky's excellent Single Field Quick Search routine, http://www.filemakermagazine.com/videos/single-field-quick-search.html. It's working well, no issues at all. It lets the end user make a selection of multiple fields they want to search, make a choice of any or all of those fields as part of their criteria, and then enter whatever string they want into a single field, click a button and get their results. Excellent end-user interface and very clever indeed.

In the particular instance I'm talking about above I'm providing end users a speciality application. Here I'm letting users establish a link between one record and another, to identify a parent's child (literally or metaphorically), or link a Contact person with a Company record. The user initiates the process by clicking a button. A new smaller window appears overlaid on the original window. An indefinite loop is initiated preventing the user from exiting the smaller window until they complete the process or cancel.

Within the small window is a standard List View for displaying results of a search, plus the identical Quick Search buttons and field for executing a search. The Quick Search routine executes smoothly as usual, one or more records are displayed. The user confirms their choice by clicking twice on the chosen record. This creates a new record, sets the necessary field and immediately executes a Commit Record step. This is working fine. This same script is set to Resume rather than Pause so the indefinite loop is interrupted. The routine continues to conclusion, closing the overlaid window, including an extra measure Commit Record step at the very end. We're now back into normal operation of the originating layout, all is very normal, except the linked record doesn't turn up in the portal. Nor does it appear in a layout that shows only records from that table. Not until the file is closed and re-opened does the linked record appear, and it appears every time.

Which leaves me scratching my head. Can anyone offer suggestions on shaking this problem loose?

Posted

Try to add the step:

Refresh Window [ ]

eventually with: Flush cached join result into brachets.

Hey Daniele, that got it. So obvious now that you pointed it out.

Thank you so much!

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