December 23, 201510 yr I have a Portal containing a Checkbox with the value of "Paid" When "Paid" is selected how do I get it to add a set amount, say 20, to a field called "Total" outside the Portal? Also when un-selected it needs to remove the same amount from the "Total" field. With Thanks Mick
December 23, 201510 yr Not sure it's ideal without more details On the child table create a field: Paid Amount = Case ( child::checkbox = "paid" ; 20 ; "" ) Then in the parent table create a field: Total Paid = Sum ( child::Paid Amount )
December 23, 201510 yr 12 hours ago, Mickdn said: When "Paid" is selected how do I get it to add a set amount, say 20, to a field called "Total" outside the Portal? I'd suggest you rethink your strategy here, because prices, fees, etc. change as time goes by - and you don't want future changes to affect existing records. Ask yourself instead: how do I auto-enter the currently charged amount into a field in the child table - either upon creation, or upon recording the actual payment?
December 23, 201510 yr Author Thanks for the replies, I've attached a file which should explain it in more detail. The amount will never really change, it's just a small database for a collection of mates that want to track what they pay into a syndicate. Thanks again. File.zip
December 23, 201510 yr 24 minutes ago, Mickdn said: The amount will never really change Famous last words ... But if you are sure about that, you can use a calculation field (defined in the parent table) = Count ( Child::Paid ) * 20 to calculate the total amount paid. This assumes the Paid field will be empty if not checked. Your title speaks of a radio button, but your question speaks of a checkbox - that's kind of confusing. Edited December 23, 201510 yr by comment
December 24, 201510 yr Author Works great, so sorry for the Checkbox, Radio Button mix up. Many Thanks
Create an account or sign in to comment