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.

search for date and other criteria

Featured Replies

My solution involves checking out and reserving equipment.

When a person attempts to checkout an asset, I perform find requests for:

1.) Set Field [LineItems::LIAssets_fK; Utility::GlobalAssetNumber] - looks for the asset to be checked out

2.) Set Field [LineItems::LineItemStatus;"<" & 2] - 1= reserved, 0= currently checked out

 

the find above works well, but I am dumbfounded as the the next step. Assets have different checkout lengths from 1 day to 1 quarter. So, I need to make sure that the date they are reserving or checking out does not match a current record - one of the found records from above.) I have the criteria to check for any date (including those in between):

 

The Utility table is my holding place for the criteria to evaluate. I tried to create a loop for the found records that would test:

If [utility::GlobalLineItemOutDate >= LineItems::LineItemDateOut and Utility::GlobalLineItemOutDate < LineItems::LineItemDueDate or Utility::GlobalDueDateCalc>= LineItems::LineItemDateOut and Utility::GlobalDueDateCalc < LineItems::LineItemDueDate]

...

The criteria above works, if there is a single record that meets the criteria. However, I am still struggling with the loop - so before I continue down that path, is there a way to create syntax that would include the date criteria in the original find request, so I do not have to perform an if/then on the found set? - can't wrap my brain around this.

 

 

 

 

 

I got a bit lost in your description. If you want to find existing bookings that overlap the currently proposed booking, you could do something like:

Go to Layout [Bookings ]
Enter Find Mode []
Set Field [ Bookings::AssetID ; Utility::gAssetID ]
Set Field [ Bookings::StartDate ; "≤" & Utility::EndDate ]
Set Field [ Bookings::EndDate ; "≥" & Utility::StartDate ]
Perform Find []

Alternatively, you could use a relationship defined as:

 

Utility::gAssetID = Bookings::AssetID
AND
Utility::StartDate ≤ Bookings::EndDate
AND
Utility::EndDate ≥ Bookings::StartDate

 

to show any existing bookings that conflict with the currently proposed one in a portal.

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.