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.

Different Find Script Based on Which Field Entered

Featured Replies

Hi,

I have a script to find records in a database. The layout for the find contains several fields. I would like the results to display differently based on which field was entered in the find. For instance if I search by PO number I would want certain script steps, if I search by a product description it would want different script steps.

I have already set it up so that based on how many records it returns it can go to a different layout, I am now trying to figure out script steps that would capture what field was entered.

Would I use several instances of IsEmpty to eliminate what fields were not entered?

Dan

Could you give us a better scenario? I really don't understand, since finds are in one table at a time. Typically, based on found count, you go to either a form view or a list view. Either way, you're still working with POs.

  • Author

I have a Purchase Order table, each item ordered is a separate record. A unique PO number is used so some POs may have one item, some may have many.

I have one search layout that includes PO Number, Vendor, Item, etc. When I search by a PO number it will return one or many records but since I am only searching in this instance by one PO number I would like the script to display the combined PO as a whole(Which I can do and have a script set up to do)

If I search by Vendor it returns one or many records but I do not want those combined since they would be from multiple PO's so I want those to show up as a list(Again I have this working)

My question is, Is there a way with a script to determine what field was used for the search and then based on that execute the appropriate script for the display I want.

OK. So, given the found set, you'd like to see how many unique POs they represent. And if they represent just one PO, then go to that PO's form.

You'll need to analyze the found set and see how many PO_IDs you have. I can't come up with a way to do this without a custom function. (perhaps, others will).

Here's a demo:

POdemo.fp7.zip

Edited by Guest

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.