phanimca / force-metadata-jdbc-driver

Automatically exported from code.google.com/p/force-metadata-jdbc-driver
0 stars 0 forks source link

FR: Include Formula in output #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Quick feature request: Would it be possible to extract the formula for formula 
fields into the Comments column?

Based on the fact that you do this for Picklist options and that there is a 
metadata API field that can output the formula, I'd think this would be 
possible, but I'm no expert.

I'll need to brush up on my Java, but I'll see if I can write this myself and 
(if so) send you a patch.

Original issue reported on code.google.com by andy.hun...@gmail.com on 24 Mar 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Well there is a method Field.getCalculatedFormula that looks like it provides 
the formula. I took the view that this was fairly detailed information that not 
everyone would want and so didn't look into it much. But just recently I've 
started marking fields in a managed released package as deprecated just in the 
label (as you can't change or remove a field once its in a managed released 
package) so want to add the option of showing the label text. So there are now 
two "optional" pieces of information so maybe its time to add a switch 
parameter.

If your formula display does work out do send along the code and I'll add it 
enabled via a switch in the connprops (and also add the label output as an 
option too). This way the current behaviour will be the default and people who 
want the extra information can switch it on.

Original comment by keith.clarke.claimvantage@gmail.com on 24 Mar 2011 at 9:46

GoogleCodeExporter commented 9 years ago
I went ahead and added both the label and formula to the comments (no switch, 
they are always output) and have added a 2.1 beta including these changes to 
the downloads. Please give this a go and post your feedback here.

Original comment by keith.clarke.claimvantage@gmail.com on 25 Mar 2011 at 1:05

GoogleCodeExporter commented 9 years ago

Original comment by keith.clarke.claimvantage@gmail.com on 25 Mar 2011 at 8:21

GoogleCodeExporter commented 9 years ago
Kudos. I wasn't even going to have time to work on this until the weekend, and 
you went implemented it 4 hours after I posted!

Works like a charm, and it may have just shaved a few hours off a major 
project, since I can see all the old formulas I'm trying to untangle at once!

Original comment by andy.hun...@gmail.com on 25 Mar 2011 at 3:20