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.

Script to find records in Date range

Featured Replies

Hi guys,

I have two scripts written to find records contained in a date range and display the found records in a report layout.

To accomplish this, two global storage fields are used: Find_StartDate and Find_EndDate to temporarely store the start and the end dates. Another date field ClockIn_Date uses the dates stored in the global fields as a search criteria.

My first script:

New Window [Name:"SEARCH TIMESHEET"; Height:335; Width:367; Top:25; Left:25]

Show/Hide Status Area [Hide]

Go to Layout ["TIMESHEET - SEARCH" (TRANSACTIONS)]

Enter Browse Mode []

My second script:

If [isEmpty ( TRANSACTIONS::Find_StartDate)]

Show Custom Dialog ["Start Date";"Start Date must have a value. Please reenter"]

Exit Script []

End If

If [isEmpty (TRANSACTIONS::Find_EndDate)]

Show Custom Dialog ["End Date";"End Date must have a value. Please reenter"]

Exit Script []

End If

If [TRANSACTIONS::Find_EndDate < TRANSACTIONS::Find_StartDate]

Show Custom Dialog ["End Start";"End Date cannot occur before Start Date. Please reenter"]

Exit Script []

End If

New Window [Name:"SEARCH RESULTS"; Height:742; Width:850; Top:25; Left:25]

Go to Layout ["TIMESHEET - FIND" (TRANSACTIONS)]

Enter Find Mode []

Insert Calculated Result [select;TRANSACTIONS::ClockIn_Date;TRANSACTIONS::Find_StartDate & "..." & TRANSACTIONS::Find_EndDate]

Perform Find []

Go to Layout ["PUNCHCARD - WEEKLY REPORT" (TRANSACTIONS)]

When the scripts are executed, I don't get passed passed the first layout. (first script).

Any help will be appreciated.

Do you mean that the New Window is never generated by the second script? What triggers the script?

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.