yaya Posted June 15, 2008 Posted June 15, 2008 Maybe the title gets you consfused. There are 3 fields, 1st text, name: Name 2nd Number, name: money 3rd number: name: Total money of current user This table record a few people's income, for example, Peter 30 , tom 40, peter 50, lina 30, tom 20 I want the 3rd field show the current user total sum money, here after I finish peter's 1st input, that record should be 30, after inputing 2nd time 30, the both peter's fields should be 80. Just show in real time that how much money the same people's money field sum. could any one let me know how to implement the "total money sum of current user" field please? Thank you very much for your help.
mr_vodka Posted June 15, 2008 Posted June 15, 2008 I dont know how adding 30 and 30 equals 80 but I am going to assume it was a typo. Anyway, if you have a self join relationship keyed on the name, you can use a calc that does Sum (SelfJoin::money). Personally I would use a PersonID rather than name but you get the point.
yaya Posted June 15, 2008 Author Posted June 15, 2008 sorry about the 30, it should be 50 on the second time. I did it succesfully, thank you. One question, why when I use sum in number format, and use specify cacultaed vaulue with same caculation "Sum ( SELF JOIN::MONEY )", nothing shows in sum field. And why I change sum field to caculation format and give it same caculation "Sum ( SELF JOIN::MONEY )", it works perfectly. what difference between these 2 ways? I thought it should give me same result? thank you very much for your help.
mr_vodka Posted June 16, 2008 Posted June 16, 2008 Because the calculated value only recalculates when a referenced field causes a trigger. You could also use a summary field here instead of a calc. You would have to put the related child version of the summary field in the self join.
yaya Posted June 16, 2008 Author Posted June 16, 2008 thank you very much, problems all sorted I've learned a lot from this :)
Recommended Posts
This topic is 6064 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