msadesign Posted August 21, 2010 Posted August 21, 2010 I'm creating a simple database of plant material, and as I work through the fields and populate each I'd like a live indication of which fields have been updated and which have not. I don't know how to achieve this? Related: I have a few fields that respond to a Yes/No value field. How can I have a live count of how many records have "Yes" in that field?
stefangs Posted August 21, 2010 Posted August 21, 2010 for your first question, i'm sure someone will have a more elegant way to achieve this than i can think of, but for @2, perhaps the following will help: create a selfjoin relationship based on the record's field that hold the value. that way, you can evaluate the number of yes or no occurences with the formula Count ( selfjoin::valuefield ) hth, stefan
comment Posted August 21, 2010 Posted August 21, 2010 I'd like a live indication of which fields have been updated and which have not. Updated - since when? And until when should this indication last? How can I have a live count of how many records have "Yes" in that field? This would be a lot easier if you used 1 and 0 (or empty) as your values - then you could simply sum the field.
msadesign Posted August 22, 2010 Author Posted August 22, 2010 You are so right about the use of 1 and 0. So, I tried building a calculation like this: sum(if(change="Yes",1,0)) But that won't work. Then I tried breaking it apart creating change_sub if(change="Yes",1,0) and then summing sum(change_sum) and that won't work either. I'll try the self-join technique, although I confess I never really understood that. Now is as good a time as every.
comment Posted August 22, 2010 Posted August 22, 2010 (edited) There is no SumIf() function in Filemaker, and the Sum() function doesn't work the way you think. If you want a "live" indication of how many records of the current found set have "yes" in the Change field, use a summary field defined as Total of [your calculation field]. If you want a count of all records in the table, define a self-join relationship using the x relational operator. Then you can use the Sum() function to sum the related records - or just place the related summary field on your layout. --- BTW, the calculation can be simply = Change = "yes" (assuming you don't want to make the Change field itself to use 1/0). Edited August 22, 2010 by Guest
msadesign Posted August 22, 2010 Author Posted August 22, 2010 There is no SumIf() function in Filemaker I left out a paren. This is what I had: sum(if()). But as you point out, Sum doesn't work the way I was thinking. If you want a "live" indication of how many records of the current found set have "yes" in the Change field, use a summary field defined as Total of [your calculation field]. The introduction of Parts is what I was hoping to avoid actually. --- BTW, the calculation can be simply = Change = "yes" You lost me here? (actually you lost me on the self-join, which I'll need to fully understand if these other methods don't work).
msadesign Posted August 22, 2010 Author Posted August 22, 2010 This is exactly what I wanted. Newbie question: how do I populate both Tables with the same Serial value? Thanks for staying with me on this.
comment Posted August 22, 2010 Posted August 22, 2010 There is only one table. It is related to (another occurrence of) itself.
msadesign Posted August 22, 2010 Author Posted August 22, 2010 thanks again, will try it in the morning.
msadesign Posted August 25, 2010 Author Posted August 25, 2010 This worked great! Have been fooling around and didn't want to respond till I was happy with it. Thanks to everyone here for taking the tie to help me out. It is appreciated mucho.
Recommended Posts
This topic is 5262 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