June 27, 200520 yr I have a field called "paid by" everytime a customer comes i fill out what they used to pay, Cheque, Cash, MasterCard etc... is there any way to calculate how many people used MasterCard? (every record is one person). Thanxs for any help
June 27, 200520 yr Do you need to store this? If not a simple find on "Mastercard" will give you the number of records
June 27, 200520 yr Author Slobey, I was thinking about that originally. but the only problem is i have to do a seperate search for every payment type. which takes time. Queue here has posted exactly what i needed, thanxs. but now to add in something else. for every payment type there is a grand total. how would i determine the grand total made for each payment type. thanxs again
June 28, 200520 yr Hmm. That part I have not quite worked out yet and am not having any luck with today.
June 28, 200520 yr I was trying to complicate it more than that and have it work regardless of the found set. Although I guess if you separate the Paid Bys into their own table, you could make it much easier and just use one relationship and calc field for a report.
June 28, 200520 yr Duh on me. A Cartesian join makes it simple, although using a related summary field is screwing with my brain.
June 28, 200520 yr It actually has a sort of logic to it, if you stop to think about it. After all, what is a related set if not a kind of a found set? If the same summary can consider different found sets for each user/window, why not a related set as well? But I should point out that it is an undocumented feature.
June 28, 200520 yr It does make sense. I am just accustomed to related summaries producing unexpected results in previous versions. I have also noticed some Get functions behaving similarly, e.g. using a related calculation involving Get(FoundCount) in place of Count(rel::serial) to count the number of records in a portal. Is this also undocumented or is it a purposeful feature?
June 28, 200520 yr Interesting. I didn't know that. Of course it's undocumented - the help says: "Returns a number that represents the number of records in the current found set." And a found set is: "The set of records in a table that are made active by a find request. When you find all records, the found set is the entire table." It would support the theory that the current object hierarchy places found and related sets in the same class, on which summaries and Get(FoundCount) operate. I suppose you've seen this?
June 29, 200520 yr I had seen that, but did not have time to digest it then. Are you using this 'feature' frequently in your solutions now? Have you noticed any drawbacks to it? Both of these features would appear to greatly reduce file size. I hope they are not considered bugs or overlooked and removed in the future.
June 29, 200520 yr I'm being rather cautious for now. There are also some refresh issues. But it is very tempting. Curious what version 8 will reveal in this aspect.
January 15, 200917 yr Newbies I had a similar situation and this helped very much. One small problem, maybe you can help. I have a checkbox, and using your example I was able to display each value and how many times each was selected. However, I want to calculate a percentage for each value based on the number of records where the checkbox was actually utilized. To clarify, this is a survey with multiple checkboxes...not every checkbox is used on a particular survey. I may have 10 surveys, but a particular checkbox may only be answered on 8 of them. I created a calculation field "Case (IsEmpty (field);0;1)" to give a value to positive responses, then made a summary field to total those responses. Problem is that my field that calculates the percentage for each value will only work for the first value...all other values display a "?". Checkbox field Summary field = 8 Value A = 4 Percentage = 50% Value B = 2 Percentage = ? Value C = 1 Percentage = ? Any ideas? Thanks, BadLt
January 15, 200917 yr Newbies Thanks for responding. I made a sample file...keep in mind that I'm not interested in surveys where the checkbox was not selected, which is why I created the "IsEmpty" Calculation field to tally positive responses and the summary field to total them. As you can see on the Results layout, only the first value in the checkbox was calculated. Thanks again BadLt_Test.zip
January 15, 200917 yr You must use the Extend() function when you refer to a non-repeating field in a repeating calculation field. BTW, I think you could make this a lot simpler. BadLt_Test.fp7.zip
January 15, 200917 yr Newbies That worked, thank you. BTW, I've found that everything I do on FM could be done simpler.
May 9, 200916 yr Newbies Hello! this example help me alot! but i still need to go further (just a little!) is it possible to do this... with 2 different fields and 2 different value list without duplicate the other fields? like this.... BadLt_Test_help.fp7.zip
Create an account or sign in to comment