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.

Range finding - anything faster?

Featured Replies

Hi all.

I have a table where filenames of photos are stored.

The filenames go by the following pattern:

MP_Vol##_p###(###-###).jpg

This is because they are scans of an old inventory book, where the # in the parentheses represent the inventory serial numbers included in a page(p###) of a certain Volume(Vol###).

Once the filename is stored in the table, I use calculation fields to "capture" separately the range of inventory items of each page.

In order to have a quickfind (search-as-you-type) functionality, I have included a global FILTER field (placed in the header), where the user can either enter a single number or a range.

Using a OnModify script trigger, I have a script which:

1. enters find mode

2. recognizes if there is a range typed,

3. enters a request creation loop,

4. enters the $FromNumber into the FromnumberCALC field as: ≤ $FromNumber and

5. then on the same request, SetField[ToNumberCALC]: ≥ $fromnumber

6. Increments the $FromNumber variable +1,

7. Loops or Exits the Loop if $FromNumber > $ToNumber

8. Performs the find and exits.

My problem is that when i enter a range such as 10-1000, it takes around 40sec to create all the needed requests.

All I am asking is:

1. Is my methodology correct?

2. Is there another more effective way for implementing this?

3. I would like all of this to work in a list-view layout, but could it be that this is the root of the problem?

Do you want to find any record that partially overlaps the requested range, or only records that contain the entire range?

  • Author

Do you want to find any record that partially overlaps the requested range, or only records that contain the entire range?

There are two cases:

1. I am looking for a specific number

2. I am looking for a range of numbers

In both cases though, the numbers are not the exact From-To of the range included in the page.

Here's an example:

ObjectNo

pgNo From To

1 | 1 - 3

2 | 3 - 3 (in case page contains only one)

3 | 3 - 5

4 | 5 - 10

5 | 10 - 11

I may be looking for:

1. Object No2, as well as,

2. Objects 2-6

Where I would need to be shown:

1. page 1, or

2. pages 1,2,3,4

as results respectively

Actually, there is only one case - because in the first example you are looking for a range from 2 to 2 (inclusive).

Try a single request to find records where:

StartPage ≤ $rangeEnd

AND

EndPage ≥ $rangeStart

  • Author

Actually, there is only one case - because in the first example you are looking for a range from 2 to 2 (inclusive).

Try a single request to find records where:

StartPage ≤ $rangeEnd

AND

EndPage ≥ $rangeStart

Seems to work, don;t know why I didn't think of it sooner... :blush2: :crazy2:

Doesn't work.

Seems to work

don;t know why I didn't think of it sooner.

That's quite a progress... :

:giggle:

ROTFLMAO

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.