6 Replies Latest reply on May 2, 2017 8:56 AM by need'nhelp

Calculated field

I'm trying to have field auto populate with one of three results based on multiple other fields.

when charge 1 type = "Moving / Misdemeanor"; charge 1 disposition finding = "Guilty" the result should be 2.00

however

when charge 1 type = "Moving / Misdemeanor"; charge 1 disposition finding = "Guilty"; charge 2 type = "Moving / Misdemeanor"; charge 2 disposition finding = "Guilty" the result should be 4.00

when all fields are empty the field should be empty

• 1. Re: Calculated field

where are you getting the 2.00 and 4.00 values? are they going to be hard coded or flexible (a lookup, perhaps?)

beverly

• 2. Re: Calculated field

Hard coded

• 3. Re: Calculated field

conviction on specific charges create a 2 dollar fee and there's the possibility of two charges per record

• 4. Re: Calculated field

"Charge 1", "Charge 2" names appear to indicate that you have multiple fields in the same record for the same type of information. This is not ideal for doing what you want to do here. A set of related records, one record for each "charge" would be much more flexible.

• 5. Re: Calculated field

the Count() function may help here:

it tells you the number of NON-blank values

so

total = fee * Count ( charge 1 ; charge 2 )

would tell (you when fee is 2.00) the total for each record. of course this is because you have only the two fields for charges.

You may well heed Phil's advice to make these related. The same formula works on related fields:

total = fee * Count ( charges::charge )

beverly

• 6. Re: Calculated field

The creation of the record is triggered with the issuance of a citation.  Each citation could have two separate charges with different charge types and different findings on each...?