kcid Posted March 20, 2008 Posted March 20, 2008 I know this is probably simple, but I just can’t get my head around it. I have a table (A) which is related to another table (. A single record in (A) may be related to many records in (: Table B has 2 field, (B::Status and B:Type) B::Status’ will contain either “Active” or “Complete”. And B:Type will contain either “Old” or “New” I need a calculated text field in table “A” return “Yes” if [color:purple]any of the multiple related records in “B” have [color:purple]both “Status=Active” and “Type = New” I hope that makes sense.
mr_vodka Posted March 20, 2008 Posted March 20, 2008 Here is one way to do it. If its for display purposes, then you dont need a calc on the parent side. If you need the calc then create a Sum () calc on the parent side. kcid.zip
kcid Posted March 20, 2008 Author Posted March 20, 2008 No matter how hard I try, I leave out one important detail. I just need an indicator in the parent table record that confirms a certain condition exists in any of the related records of the child table. If the conditions are not true in any of the related records , then the indicator is empty If the condition is true in any of the related child records, the user can decide to investigate further, by viewing the related child records. I hope I did better this time in explaining my need.
Newbies lsamberg Posted March 21, 2008 Newbies Posted March 21, 2008 Well I don;t know if this is the most elegant way to do it, but I tried it and it works. In the main database create a global field that contains the string "ActiveNew". In the subsidiary database create a computed field that concatenates the two fields. Create the relationship so that it includes both the Key between the records AND a link between the global field and the computed field. Then in the main database you can create a computed field like (if (count(sub::any-field)>0, "Yes", "No"))
mr_vodka Posted March 21, 2008 Posted March 21, 2008 Ok. But the file that I posted does exactly what you are asking for. If this is not what you were looking for, then please restate.
kcid Posted March 22, 2008 Author Posted March 22, 2008 Hi, Thanks. I made a couple of changes to the DB itself, and adapted your suggestion. Thanks, again. All is good.
Recommended Posts
This topic is 6150 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 accountSign in
Already have an account? Sign in here.
Sign In Now