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

  • Newbies

So made a find button

On entering the button, Enters Find Mode:

Enter specific Find: omit records: Critera: would like to omit any records 60 days older than todays date: So omit records:// ...lost now.

i know its something simple

Made 2 new field Current_Date & Find_30

Script name: Customer_Report

Enter Find mode[pause]

perform find[]

insert current date[select;job ticket::current_date]

Insert calculated result[select;job ticket::Find_30;job ticket::jobdue - job ticket::current_date]

Constrain Found set[restore]

Find Records jobticket::Find-30[>30]

Critera: would like to omit any records 60 days older than todays date: So omit records:

Made 2 new field Current_Date & Find_30

You do not need these two new fields because you can specify the criteria right within your find script, icechip, so let's review your script:

Script name: Customer_Report

Enter Find mode[pause]

Set Error Capture [ On ] ... important to trap for no records found or errors

perform find[]

If [ Get ( LastError ) // error or no records found ]

Show Custom Dialog [ OK ; "No records found."]

... do whatever you wish because there were no records

Exit Script

End If

... records found so proceed ...

... I assume you begin with this find so Users can specify different criteria and then you want to constrain to within 60 days of current date?

insert current date[select;job ticket::current_date]

Insert calculated result[select;job ticket::Find_30;job ticket::jobdue - job ticket::current_date]

Constrain Found set[restore]

Find Records jobticket::Find-30[>30]

... this won't work because Find Requests only handle static data and not calculations (unless you place them first in variable and that is not required here anyway)

Enter Find Mode [ uncheck pause ]

Set Field [ Job ticket::JobDue ; ">" & Get ( CurrentDate ) - 60 ]

Constrain Found Set [ ]

I believe that FM uses just as much resource/time to find records which DO meet find criteria as it does to find records which don't. Is this getting you closer to what you need? :)

  • Author
  • Newbies

it seems to be much simpler , until i reach this line Set Field [ Job ticket::JobDue ; ">" & Get ( CurrentDate ) - 60 ]

states that /*-+ is expected?

You do not need these two new fields because you can specify the criteria right within your find script, icechip, so let's review your script:

Script name: Customer_Report

Enter Find mode[pause]

Set Error Capture [ On ] ... important to trap for no records found or errors

perform find[]

If [ Get ( LastError ) // error or no records found ]

Show Custom Dialog [ OK ; "No records found."]

... do whatever you wish because there were no records

Exit Script

End If

... records found so proceed ...

... I assume you begin with this find so Users can specify different criteria and then you want to constrain to within 60 days of current date?

insert current date[select;job ticket::current_date]

Insert calculated result[select;job ticket::Find_30;job ticket::jobdue - job ticket::current_date]

Constrain Found set[restore]

Find Records jobticket::Find-30[>30]

... this won't work because Find Requests only handle static data and not calculations (unless you place them first in variable and that is not required here anyway)

Enter Find Mode [ uncheck pause ]

Set Field [ Job ticket::JobDue ; ">" & Get ( CurrentDate ) - 60 ]

Constrain Found Set [ ]

I believe that FM uses just as much resource/time to find records which DO meet find criteria as it does to find records which don't. Is this getting you closer to what you need? :)

it seems to be much simpler , until i reach this line Set Field [ Job ticket::JobDue ; ">" & Get ( CurrentDate ) - 60 ]

states that /*-+ is expected?

There are two parts to the Set Field[] script step:

1) Specify Target Field - this is where you select the field you wish to set, which in this case is the portion in blue above.

2) The Calculated result - this is where you type the calculation you want to use, which in this case is the red above.

These two parts are separated by a semicolon (in black). What you did was skip 1 and enter the entire portion into 2 which will produce the exact error you received. :)

So instead, select your field in 1 and enter ONLY the red in the calculation box in 2.

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.