November 2, 200421 yr I have a table with fields that have a yes or no entry. Can I create a new field and write a script that will count all the yes entries and all the no entries separately.
November 2, 200421 yr Wouldn't bet on this with v7 (I don't have it here for the test), but you may just try a Sum(Cartesian::MyField) Yes and No would equal 1 or 0. So Sum(Cartesian::MyField) gives all yes while Get(RecordCount)-Sum(Cartesian::MyField) gives all no.
November 2, 200421 yr If you want the grand total of yes's, then you would need a summary field for each yes/no field and then a calculated field using GetSummary multiple times to add all those summary fields. You would then get the no's by subtraction. Whew... Or you could write a script to loop over all records, and loop over all fields within a record, adding to two global fields, sum_yes or sum_no, depending on the content of the field.
November 2, 200421 yr I didn't catched there was multiple fields in each record. If so, and if v7 still allows for text boolean values, then a calc YesTotalPerRecord = TextYN_1+TextYN_2+TextYN_3+...TextYN_n NoTotalPerRecord = Number of TextYN fields -(YesTotalPerRecord) Then you may use Summary Fields or Sum (Relationship) according to your needs. Does this stil work with 7 ?
November 2, 200421 yr "If so, and if v7 still allows for text boolean values" Nope. vs. 7 does not identify Y/N, Yes/No, T/F or True/False
November 2, 200421 yr Got side-tracked sorry. Here's the rest of it ... Create YES number standard field with: (Field1 = "Yes") + (Field2 = "Yes") + (Field3 = "Yes") Use auto-enter via this calculation, unclick 'Do Not Replace.' Repeat with "No:". Then create a Summary calc (or summarize in report). I wouldn't script it at all because you'll have to run script every time a value might change.
November 2, 200421 yr Ok, I remembered seeing something about v7 discontinuing boolean text structure, but wasn't really sure of it. Thanks for this confirmation MoonShadow.
Create an account or sign in to comment