Mickdn Posted December 23, 2015 Posted December 23, 2015 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
Ocean West Posted December 23, 2015 Posted December 23, 2015 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 )
comment Posted December 23, 2015 Posted December 23, 2015 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?
Mickdn Posted December 23, 2015 Author Posted December 23, 2015 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
comment Posted December 23, 2015 Posted December 23, 2015 (edited) 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, 2015 by comment
Mickdn Posted December 24, 2015 Author Posted December 24, 2015 Works great, so sorry for the Checkbox, Radio Button mix up. Many Thanks
Recommended Posts
This topic is 3314 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