Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Calculations from Drop Down Fields

edited March 2012
Hi,

I've got several fields that use drop down lists. My intent was to get the item chosen from the drop down list in the field.Value and use the numerical part of that to populate another field, e.g.

What I was hoping was that the calculation of this field would pull the 7 out, thisfield.Value + thatfield.Value would sum as 7 plus...

Maybe I'm going about this the wrong way but I'm getting a field sum of 0. I tried a few variations and the conclusion I've come to is that numerical values on their own such as "+5" do work but if I've got some text in there as well the sum is 0.

"Veteran (Vet) AdCost +7" - doesn't work the sum is 0
"+2 (stuff)" - doesn't work the sum is 0
"+5" works great, the sum is 5
"Animist Anm AdCost +3" - doesn't work the sum is 0
"AdCost +7 Veteran Vet" - doesn't work the sum is 0

I just wanted to check and see if this is the expected behaviour or if anyone has an alternative.

Thanks,
Greg
:-)

• If I understand what you are saying, you'd have to use javascript to extract the "+7" out of the text first.

Actually, what I'd recommend is using a lookup list. Have the other fields use a Lookup( List, Field) as their source. See the 2 page character sheet example that comes with the program, and look at how weapons are handled on the character sheet.
• Ed_NBOS wrote:
If I understand what you are saying, you'd have to use javascript to extract the "+7" out of the text first.

Actually, what I'd recommend is using a lookup list. Have the other fields use a Lookup( List, Field) as their source. See the 2 page character sheet example that comes with the program, and look at how weapons are handled on the character sheet.

Hi Ed,

Thanks for the reply, and I'm sorry I didn't get back to you sooner. I started tinkering with csv and I got the fields populated the way I was wanting. I should have checked out the sample sheets first but I just jumped in head first!

I'm working on a Chimera Basic character sheet. I've been trying to keep it on one page but perhaps that's rigid thinking!

Thanks for the tip! I'll check that out for sure.

all the best,

Greg
:-)