You need to sign in to do that

Don't have an account?

Andrea Messineo

# Using numbers, currency, and percentages in formulas: issue with submission

I submitted my work and I received this error message. The challenge says nothing about adding a field with this name.

Challenge Not yet complete... here's what's wrong:

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Discount_Percent__c]: [Discount_Percent__c]

Challenge Not yet complete... here's what's wrong:

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Discount_Percent__c]: [Discount_Percent__c]

pconAre you using a new Developer Edition org when doing this challenge? If not, then you may have fields / triggers / validation rules from previous challenges interferring. I would recommend that you look at the fields on your object and if you can remove the

Discount_Percent__cfield. Alternately you can create a new Developer Edition org [1] and redo the work in there. This will ensure that your previous challenges are not interferring with your current work. If you follow the directions in the link below you willloose any of your existing Trailhead badges / points.not[1] https://developer.salesforce.com/forums/?id=906F00000005JciIAE

## All Answers

pconAre you using a new Developer Edition org when doing this challenge? If not, then you may have fields / triggers / validation rules from previous challenges interferring. I would recommend that you look at the fields on your object and if you can remove the

Discount_Percent__cfield. Alternately you can create a new Developer Edition org [1] and redo the work in there. This will ensure that your previous challenges are not interferring with your current work. If you follow the directions in the link below you willloose any of your existing Trailhead badges / points.not[1] https://developer.salesforce.com/forums/?id=906F00000005JciIAE

Andrea MessineoYes, I'm using a developer org. I deleted the discount percentage field, which I created in October, probably as part of another project. I still got the same message when trying to resubmit. Is starting over really the only option? Andrea MessineoThanks! I started with a new developer org and I think I'm doing something wrong with the formula. I've made minor tweaks to see if they would work, but here's the basic formula. I can't figure out what's wrong!

ROUND(3.14159 * radius__c^2 * height__c,0)

This is the error:

Challenge Not yet complete... here's what's wrong:

The 'Cylinder_Volume__c' formula field did not return the correct value for a input values of Height of 10 and a Radius of 10. The expected value from the Cylinder_Volume__c formula was 3142.

Andrea MessineoI figured it out. I didn't need the ROUND formula. I wish the errors were more clear! bhatt bijalhi

i have the same problem..

i try to round it but not able to complete yet

Challenge Not yet complete... here's what's wrong:

The 'Cylinder_Volume__c' formula field did not return the correct value for a input values of Height of 10 and a Radius of 10. The expected value from the Cylinder_Volume__c formula was 3142.

pconBhatt, can you please provide the formula you have in place? Rebecca BellDoes anyone know what the correct formula is?

I've tried everything and clearly there's something I'm doing wrong! Here's the formula I came up with:

3.14159 * radius__c^2 * height__c

This is the error:

Challenge Not yet complete... here's what's wrong:

The 'Cylinder_Volume__c' formula field did not return the correct value for a input values of Height of 10 and a Radius of 10. The expected value from the Cylinder_Volume__c formula was 3142.

Please help if you can!

pconI used the following
3.14159 * radius__c * radius__c * height__c
You want to also make sure that your formula has 0 decimal points Rebecca Bellank you pcon you solved the issue! bhatt bijalhi pcon,

yeap ,

Thanks , i got completed.

Andrew Eversley@Pron....I want to thank you for you input on this question, it solved my issue for me.

Just wanted to ask what is the justification of using the 0 decimal places in lieu of the customary 2 decimal places?

pcon@Andrew the reason I used 0 decimal places was because when I did it with 2 decimal places it failed and the expected number had 0 decimal places. It probably wouldn't hurt to leave feedback on that module to add clarification on the number of decimal places. M MillerFor anyone who is struggling with the discount_percent error message and doesn't want to delete that custom field (or start over in a new org), you can just go into that field's settings and uncheck the box (under general options) that makes it required. A super easy fix!

Joseph KyleThank you @pcon. The "Insert Operator ^" or "Insert Selected Function of EXP" would not work here. I hate to have to find the answers to these modules on line - would much rather figure them out on my own. However, I would have never sorted this out otherwise. Thank you. Tiffany Vasquez3.14159*(radius__c ^2)* height__c

Seems it's trying to do radius__c^(2*height__c) if you dont put the () around the exponent, which is silly because order of operations states exponents before multiplication.

Mars Rover 468Not sure why I am getting this error. I remember this caption on the other challenge and not this one so i cant figure why it is not completeing. Any answers guys?

"There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, 'Hey McFly, unless you are planning to go back in time, please update your close date': []"

Mars Rover 468I figured it out need to deactivate the validation rule and everything worked. Scott Metcalfe 5thank you @pcorn. your formula worked for me. I had 3.14159 * radius__c^2 * height__c but it kept giving me an error. any idea why radius__c^2 doesn't work? it's the same thing as radius__c * radius__c pcon@Scott, I don't know why it doesn't work. There have been a couple of other people that have tried to use the built in exponent feature and have failed. It may be that the module checker itself is expecting the ^ operator. Or it may be some weird order of operations in the formula manager. Maybe doing 3.14159 * (radius__c ^ 2) * height__c would fix it. Simrandeep Singh 6The correct way to answer the trail is : 3.14159*(radius__c ^2)* height__c

Apply the BODMAS rule i.e brackets should be goven prefernece if we don't put () in front of radius__c then it will consider it as 2*height__c.

Zacharie DuboisFor those who started again with a new Trailhead Playground and still experience the same issue. Refresh the page that checks the challenge, select your new org, and then check again. Karis Crichtonmine is saying

"The field 'Cylinder_Volume__c' is a Number"

is it not supposed to be a number??