Skip 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.

Deleting Records

Featured Replies

This script searches the "Order Entry" layout for Order Numbers for a current Run Date and exports the File.

It then goes to a "SearchResults" Table (which is not linked to the "Order Entry" Table). Deletes Records from previous Searches and imports the the files containing the Order Numbers. Then it goes to "TeamEimages" (which is not linked to the "Order Entry" Table). Deletes Records from previous Searches and imports the the resulting text file from the Send Event command (it reads a folder of images).

The results are compared on the SearchResults layout which is linked to the TeamEimages layout.

Problem:

2 out of 8 weeks the script has deleted a few thousand records from the Order Entry layout, although the Delete Records Command is directed at either the "SearchResults" layout or "TeamEimages" layout.

CheckImages

Allow User Abort [ Off ]

Freeze Window

Perform Script [ "FindRecordsForRunDatePC" ]

Go to Layout [ "SearchResults" (SearchResults) ]

Show All Records

Delete All Records

[ No dialog ]

Import Records [ Source: "filewin:/T:/SOdataFiles/SearchText.

Source field 2 import to SearchResults::Name ]

[ No dialog ]

Go to Layout [ "TeamEimages" (TeamEimages) ]

Show All Records

Delete All Records

[ No dialog ]

Send Event [ open document; "cmd /c dir /b T:" & ""& Quote

Pause/Resume Script [ Duration (seconds);) 1 ]

Import Records [ Source: "filewin:/T:/SOdataFiles/Outputfile.

[ No dialog ]

Go to Layout [ "SearchResults" (SearchResults) ]

FindRecordsForRunDatePC

Go to Layout [ "Order Entry" (SPECIA1112) ]

Enter Find Mode [ ]

Show Custom Dialog [ Title: "Find Records For Run Date"; Message: "This dialog will take the date you enter and find the records.

Note: Date should be entered in the following format: mm/dd/yy - 12/24/6"; Buttons: “OK”, "Cancel"; Input #1: SPECIA1112::Run Date, "Run Date - mm/dd/yy" ]

Perform Find [ ]

Export Records [ File Name: "filewin:/T:/SOdataFiles/SearchText.tab"; Character Set: “Windows (ANSI)”; Field Order: SPECIA1112::Run Date

SPECIA1112::Ad Number ]

[ No dialog ]

Any help appreciated.

I am not exactly sure where the issue is but I definately see that you need to put in some steps for error trapping. Currently there are no checks for find failures, empty sets, import errors, etc. I think you should add in a GetLastMessageChoice check as well for your message window.

  • Author

Quite right, I should have some error trapping in there.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.