• Hello again,

    Sorry to keep asking lots of questions, but once I have the main setup done, I will be good to go…so thank you for your patience.

    Is there a way with the current version, or possibly with your upgraded version to count entries in a “Multiselect Checkbox” – so for example, if the multiselect was as follows:

    Car Design:

    – Leather seats: Checked
    – Alloy wheels: Checked
    – Metallic paint: Unchecked
    – Satnav: Unchecked
    – Diesel: Checked

    So in this case all the “Checked” items would equate to 1 and all the “Unchecked” items would equate to 0, which means the total would equal 3 in the above example.

    Thank you

Viewing 15 replies - 1 through 15 (of 94 total)
  • Plugin Author xnau webdesign

    (@xnau)

    This is a good question, I’m interested to hear how people want to use the new calculated fields. Numeric calc fields can only calculate numeric values and don’t have the ability to convert text values (such as the value stored by a multiselect) to numbers. It can be done with custom code, so if you have some coding skills, this is possible.

    Thread Starter in-business

    (@in-business)

    Thank you, would it work using “if” statements perhaps like in Excel, and a long time ago I did do some programming in “Basic”, but if you are able to give some pointers as to how this code might look once the new version is out, that would be very helpful.

    For example on one of my other blogs I use Calculated Fields Form plugin, and on this I am able convert a “Yes” into a number, which is very useful for certain forms.

    Cheers, Russell

    Plugin Author xnau webdesign

    (@xnau)

    The numeric calc field can only perform arithmetic-type operations, no logic operations, so it’s not possible.

    The complete explanation for how the calculation fields work is here:

    Participants Database Calculation Fields

    Thread Starter in-business

    (@in-business)

    Hiya, does that mean the new version for calculated fields has been released?

    How do I update my plugin please, as there doesn’t appear to be an update?

    Thank you

    Thread Starter in-business

    (@in-business)

    Hi – forget this question, the update has filtered though now, so I have the calculated fields now, thank you for your help!

    Thread Starter in-business

    (@in-business)

    Hi – I’ve noticed that fields such as Numeric and the new Numeric Calculation cannot be selected in the Post Content Source Fields.

    Is there a reason for this, as it would be very useful for what I am trying to do with the Numeric Calculation to display the result.

    Thank you, Russell

    Plugin Author xnau webdesign

    (@xnau)

    Hi Russell,

    Thanks for letting me know about this…yes, those fields should be available, it will take a little time for all the add-ons to be fully on board with the new features of PDB 2.0.

    Questions about our premium add-ons need to go in the add-on’s support forum, this forum is for the Participants Database plugin. This is partly so that questions here are not confusing to people who don’t have the add-on.

    Hi Roland,

    That’s interesting that someone else uses the Calculated Fields Form plugin.
    I have 2 questions:

    1) If I want to sum up a bunch of fields and multiply that by 10, can I just do *10? Or do I have to set up a numeric field [multiplier]?

    2) I have a similar problem as in-business. I have a list of checkboxes whose values are 1 if checked. I suppose I can even make them a different number when checked. And the numeric values can be added together.

    Now I also have a field with 3 radio buttons: team captain, teammate, and individual. I want to assign 25 points for a team captain, and 5 points for a teammate. Can I assign a value to the radio buttons (similar to the checkbox) so that I can carry the values over to a numeric calculation field? I’m ok with only saving the values. (I can convert them back to the options through Calculated Fields Form.)

    Thanks! The Numeric Calculation is a lifesaver.

    Thread Starter in-business

    (@in-business)

    Hi – thank you… are you saying that the numeric and Numeric Calculation fields will show in the selection so they show on a Proxy Page? And sorry about posting in the wrong place, cheers, Russell

    Plugin Author xnau webdesign

    (@xnau)

    @crowwoods1 Yes, you can use multiplication in the calculation, it will need to be the last step in the calculation.

    Take a look here for the details: Calculation Fields

    You can try setting up your multiselect with numbers like that, but there could be problems because instead of readable string values, you’ll just have a bunch of numbers.

    @in-business numeric and date calculation fields are not currently supported in Proxy Posts, I’m working on it, though.

    Hi,
    I did get the numeric fields to add and multiply. Thanks!

    I couldn’t get the checkbox fields to add. The checkbox values in the database look the same as the numeric field values, just 1’s instead of bigger numbers. Why doesn’t it work?

    How can I assign values to the radio buttons and just save those instead? A line of code in the attributes? I don’t think of radio buttons as multiselect. The reason I like it is because the participant can only choose one button. Team captain gets 25 points, teammate 5 points, individual 0 points.

    Thanks, Ivy

    Hi,

    I just got the checkbox fields to work. It turns out I had to add a 0 for the unchecked box, so that the field would have 0 or 1, and not blank. Whereas a numeric field doesn’t have that requirement.

    I’m still thinking about a workaround for the radio buttons.
    Thank you!
    Ivy

    Hi,

    Me again. One more issue I may have to work around. I am summing 2 Calculated Fields since the numeric fields and checkbox fields are adding up so nicely. I notice that when I submit the first time, that 3rd Calculated Field (total_points) doesn’t get calculated. I understand that it’s because the first 2 Calculated Fields doesn’t get added to the database until I press Submit. Is there a way to get around that?

    Ivy

    Plugin Author xnau webdesign

    (@xnau)

    You are correct, using a calculated field in a calculated field template will not work reliably because we don’t have any way to sequence the calculations to make this work correctly every time. It can work if the calculated field you are using in the template is not getting changed, but if it is getting changed, the second calculation probably won’t be correct.

    For it to work reliably, you have to construct the calculation template without using other calculated fields in the template.

    Hmmm, I just realized that my problem is bigger than that. When the participant updates their action fields, the 2 calculated fields won’t reflect the updates. They in essence have to hit that Submit button twice to get the 2 Calculated Fields. Then they have to hit it a 3rd time to get the sum of the two Calculated Fields.

    Is there a way to hit Save 3 times for them when they hit it once?

Viewing 15 replies - 1 through 15 (of 94 total)
  • The topic ‘Numeric Calculation’ is closed to new replies.