Jump to content
Sign in to follow this  

Different Find Script Based on Which Field Entered

Recommended Posts


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?


Share this post

Link to post
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.

Share this post

Link to post
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.

Share this post

Link to post
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:


Edited by Guest

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Will Xu 

Important Information

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