Jump to content

Radio Button Calc


 Share

This topic is 2378 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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 ) 

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by comment
Link to comment
Share on other sites

This topic is 2378 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.