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.

Constrain Found Set/Omit Records

Featured Replies

Hi all. I am trying to find records in a date range and exclude certain records from that find. I am unable to get the desired result from the following script steps, could anyone point me in the right direction please.

I am trying to find all records in the date range that have a value in the BankExpenditure and PettyCash field while excluding records that have a Type description of Transfer Receipt and where the Description_BankData field contains CostFranch as part of the description

 

# TEST - COST / EXPENSES FOR DATE RANGE

Go to Layout [ “Costs” (Costs) ; Animation: None ]

Enter Find Mode [ Pause: Off ]

Set Field [ Costs::DateStatement ; $DateReportStart & "..." & $DateReportEnd ]

Set Field [ Costs::Amount_BankExpenditure ; ">0" ]

New Record/Request

Set Field [ Costs::DateStatement ; $DateReportStart & "..." & $DateReportEnd ]

Set Field [ Costs::Amount_PettyCash ; ">0" ]

Perform Find []

Constrain Found Set []

Set Field [ Costs::DateStatement ; $DateReportStart & "..." & $DateReportEnd ]

Set Field [ Costs::Type ; "≠" & "Transfer Receipt" ]

Constrain Found Set []

Set Field [ Costs::DateStatement ; $DateReportStart & "..." & $DateReportEnd ]

Set Field [ Costs::Description_BankData ; "≠" & "*Costfranch*" ]

Sort Records [ Restore ; With dialog: Off ]

#

Set Variable [ $Path ; Value: Get (TemporaryPath) & "Expenses" & ".xlsx" ]

Export Records [ With dialog: Off ; Create folders: Off ; “$Path” ; Unicode (UTF-16) ]

#

Set Variable [ $AttachmentList ; Value: If ( IsEmpty ( $AttachmentList ) ; $Path ; $AttachmentList & "¶" & $Path) ]

 

 

Solved by comment

Go to solution
  • Solution

You don't need to use Constrain Found Set[] to exclude specific records from being found. You just need to add an Omit request/s to your find.

Here is a simple example that finds records in the given date range but excludes records whose Type is "Transfer Receipt":

Set Variable [ $startDate ; Value: ... ]
Set Variable [ $endDate ; Value: ... ]
Enter Find Mode []
Go to Layout [ “Costs” ]
Set Field [ Costs::DateStatement ; $startDate & ".." & $endDate ]
New Record/Request
Set Field [ Costs::Type ; "Transfer Receipt" ]
Omit Record
Perform Find []

 

  • Author
17 minutes ago, comment said:

You don't need to use Constrain Found Set[] to exclude specific records from being found. You just need to add an Omit request/s to your find.

Here is a simple example that finds records in the given date range but excludes records whose Type is "Transfer Receipt":

Set Variable [ $startDate ; Value: ... ]
Set Variable [ $endDate ; Value: ... ]
Enter Find Mode []
Go to Layout [ “Costs” ]
Set Field [ Costs::DateStatement ; $startDate & ".." & $endDate ]
New Record/Request
Set Field [ Costs::Type ; "Transfer Receipt" ]
Omit Record
Perform Find []

 

Thank you, so blasted simple

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.