Jump to content

Different Find Script Based on Which Field Entered


dannyg

This topic is 5557 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

This topic is 5557 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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