Skip 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.

C = A + B script needs help

Featured Replies

I need to execute a script that does this:

Enter search criteria in field C, have the find look in field A and field B for the results, have the results posted as a columnar report in Field C

WHERE: Field A and B are a date fields, result C is a date field

WHERE: Field A is in main database, Field B is in another database, result Field C is in main database

If needed, the search criteria can be entered into new field D, where results from A and B are displayed in C

In all instances, only a single date will be searched, not a range. The results from both field A and Field B MUST be displayed in field C

Thank you.

The find you want to perform is easy, you just need to answer one question: Do you want to find all records where both fields match, or all records where one of the fields match?

Both fields must match = your script will:

Enter find mode

Go to field C

Wait for user to enter date

Set field A to field C

Set field B to field C

Set field C to empty

Perform search

One field must match = your script will:

Enter find mode

Go to field C

Wait for user to enter date

Set field A to field C

Create a new find-request

Set field B to field C

Set field C to empty

Perform search

Ok, that’s the easy part. The problem you have is with wanting to use a report. You say using field C, but field C can have either a date from field A or from field B, not from both. Which field should be used first, or do you need both? If, for example, field A is more important than field B, i.e. your script should only check field B if field A is empty, then you simply need to use a case statement in field C, saying that C should be set to B only if A is empty. In other words, we need more information here. If the results of fields A and B need to be in separate reports, then perform one script in the main file, and then the next in the related file.

Or….. Use a third file: Find all the records that meet your criteria in file1, import them into file3, then do the same for file2. Then you have all the found records in one file. You see my point? The possibilities are endless. Give us more information.

Rigsby

  • Author

More information, you got it...please see my post "Multiple Finds: Portals and fields" under Finding and Searching....

the information from both A and B need to be displayed.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.