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.

Featured Replies

I have a date field that I am using to determine how recently a record has be exported, if at all. Now I am being asked to have the record flagged to be re-exported every time it is modified (without initiating a script). Is there a way of clearing a date every time the record is modified? Am I lame for not seeing it? Anyone?

-Heather

The tricky bit here is that modifying any non-global field in the record will change the modification date/time of the record.

As part of the export routine, set g_export_date and g_export_time GLOBAL fields to record the export date and time for the records which were exported. Set a "Has been exported" text field as "Yes". "Has been exported" should be set to auto enter "No" on creation of a record.

You already have, I assume, modification_date and modification_time fields in your file.

Now, create another text field called "Needs_to_be_Exported" so that:

code:


Needs_to_be_Exported = if(Has been exported = "No" or modification_date > export_date , "Yes",

if(modification_time > export_time and modification_date = export_date , "Yes",""))

Execute a Find for "Yes" in the "Needs_to_be_Exported" field to show records which need to be re-exported.

This should do it. BTW, if your are trying to clear a date field, best set a field as Date("","","") otherwise you won't get a totally clear field.

Now, for the script you actually use to export the records...

Find the "Yes" in Needs_to_be_Exported

Replace All [Has been exported,"Yes"]

Export...

Pause["00:00:02"]

SetField[g_Export_Date, Status(CurrentDate)]

SetField[g_Export_Time, Status(CurrentTime)]

The order of these steps is very important, otherwise you run the risk of the modification caused by the replace step happening at the same time as the set field steps - whcih could casue the records to be re-flagged for re-exporting. The pause step makes it safer. I have put it after the export routine in case your exporting procedure changes any of the fields in the records.

Gee - this has got long and the issue of global fields in a multi user environment hasn't been solved... Will send you a file. There must be a simpler way.

Russ

[ April 15, 2002, 11:22 PM: Message edited by: Russell Baker ]

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.