Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Am I going about this correctly?

Status
Not open for further replies.

Shanksta

Technical User
Jun 28, 2002
96
US
I have 2 databases, one that lists parts of a product, and a second tha lists products and the parts that they are ocmposed of. In the products database I have a drop down for each part that is used in its production which then links up to the price and so forth...

I want to have an option on each part record to specify whether that part has been depleted and if it has I dont want it to show up on the drop down list.

Now how would I go about this?

Im thinking that I need to create a script that checks the relationship and sees if this "depletion" option is checked or not, and then only display those that are not checked. Right?

Also what script functions would I use to do this?
 
You are on the $$$
u can use/add filed called "CheckStatus" = calculated field
CheckStatus = Case(not IsEmpty(Depleated_Field),1,0)

then u just sort based on field CheckStatus and use the sorted records to populate your list!
DB perspective:

[product_name]---[Depleated_Field]-----[CheckStatus]
======================================================
Chair-----------contains something--------------1
Table-----------contains something--------------1
MyWife:)--------empty---------------------------0
========================================================
so now u perform a find where CHeckStatus=1 and u will get the list of all deplated...or even just use ANY_FIELD and set the same conditioning....case is not empty (eg. sales_date)
All the best!


> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top