twardnw
asked on
Use a percentage on a form
Scenario: Our sales staff puts in an estimated value, and probability, which generates a weghted value, when an opportunity is created. They would much prefer entering an actual percentage for the probability, rather than a decimal. How can I set this up and still have CRM calculate the weighted value.
One way which just sprung to mind would be to divide value of the probability by 100, then perform the calculation. I'll test that now, but am still open to suggestions.
One way which just sprung to mind would be to divide value of the probability by 100, then perform the calculation. I'll test that now, but am still open to suggestions.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Basically you're looking for an OnChange or OnSave on the picklist that updates a another value that is either not on the form or hidden on the form.
So if you pick 10%, it will update the other field.
So if you pick 10%, it will update the other field.
ASKER
Would I just be referencing it as new_picklist.value ?
Where value 1 = 0%, value 2 = 5%, value 3 = 10%, etc.
How would to code for that work? The attributes I am work with are:
new_weight - this is the calculated value, money type attribute
estimatedvalue - 'money' type attribute
new_opp_probabilitypick - picklist of %'s in 5% increments
new_probability - old probability attribute, I could use this to store the decimal value of each percent.
Where value 1 = 0%, value 2 = 5%, value 3 = 10%, etc.
How would to code for that work? The attributes I am work with are:
new_weight - this is the calculated value, money type attribute
estimatedvalue - 'money' type attribute
new_opp_probabilitypick - picklist of %'s in 5% increments
new_probability - old probability attribute, I could use this to store the decimal value of each percent.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys, exactly what I was needing, got it working perfectly now!
ASKER
crmForm.all.new_weight.val
and that generates a NaN value in the weighted value on the form.
Just talked it over with our sales guy, he is in favor of doing it as a picklist, so I'll start on that, any hints on the syntax for that?