• LGSOChair
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello
As a solution to a question I posted the other day (http://community.salesforce.com/sforce/board/message?board.id=general_development&thread.id=23809) someone suggested using a VLOOKUP (which is a brilliant idea :smileyhappy:)

Now I've been brave and set up a custom object with two fields in it:

Custom object = Membership_Category_for_Lookup (that's the object name)
Fields = Base_Fee and Membership_Category

So looking at the help section, I thought my VLOOKUP formula should be:

VLOOKUP($ObjectType.Membership_Category_for_Lookup.Fields.Base_Fee,
$ObjectType.Membership_Category_for_Lookup.Fields.Name,
 Membership_Category__c )

But I'm getting an error that says the field $ObjectType.Membership_Category_for_Lookup.Fields.Base_Fee doesn't exist.

I'm a bit stumped. I've tried several things like using the API name and so on, but no luck.

Anyone got any suggestions?

Thanks
Nicole
Hello
I have a very complex step of calculations that refer to each other in sequence. This is causing problems as the total length of the formula has to be less than 5000 characters and Salesforce support are saying that even though there's no way 5000 characters in all the formulae, it all adds up in some complicated way.

I'm trying to calculate an organisation's membership fee which is based on:

Base fee =
IF(ISPICKVAL( Membership_Category__c,"A"),(110+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"B"),(230+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"C"),(500 +Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"D"),(875+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"E"), (2175+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"F"),(3800+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"G"), (4500+Unrestricted_funds__c*0.0002),0)))))))

Distance from London adjustment =
IF(ISPICKVAL(Distance_From_London__c,"M25-150m"),( base_fee__c *0.95),
IF(ISPICKVAL(Distance_From_London__c,"150-300m"),(base_fee__c *0.90),
IF(ISPICKVAL(Distance_From_London__c,">300m"),( base_fee__c *0.85),base_fee__c )))

Application period adjustment =
IF(ISPICKVAL(  Application_Period__c , "April-June"), ( Distance_from_london_amount__c -  Agreed_Additional_Discount_Amount__c ),
IF(ISPICKVAL(  Application_Period__c , "July-Sept"), ( Distance_from_london_amount__c * 0.75 -  Agreed_Additional_Discount_Amount__c ),
IF(ISPICKVAL(  Application_Period__c , "Oct-Dec"), ( Distance_from_london_amount__c * 0.5 - Agreed_Additional_Discount_Amount__c ),
IF(ISPICKVAL(  Application_Period__c , "Jan-March"), ( Distance_from_london_amount__c * 0.25 - Agreed_Additional_Discount_Amount__c ), Distance_from_london_amount__c ))))

As you can see, the three formulae are no where near 5000 characters long, but checking the syntax on the third formula says that there are over 22,000 characters....

So, the only thing I can think of is creating a field that isn't a formula, but simply copies the result from the Base Fee calculation fee as this would reset the character count. But I don't know how to do this.

Is there a bit of code I can use to pull the info from one field into another?

Thanks
Nicole
Hello
I have a very complex step of calculations that refer to each other in sequence. This is causing problems as the total length of the formula has to be less than 5000 characters and Salesforce support are saying that even though there's no way 5000 characters in all the formulae, it all adds up in some complicated way.

I'm trying to calculate an organisation's membership fee which is based on:

Base fee =
IF(ISPICKVAL( Membership_Category__c,"A"),(110+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"B"),(230+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"C"),(500 +Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"D"),(875+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"E"), (2175+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"F"),(3800+Unrestricted_funds__c*0.0002),
IF(ISPICKVAL( Membership_Category__c,"G"), (4500+Unrestricted_funds__c*0.0002),0)))))))

Distance from London adjustment =
IF(ISPICKVAL(Distance_From_London__c,"M25-150m"),( base_fee__c *0.95),
IF(ISPICKVAL(Distance_From_London__c,"150-300m"),(base_fee__c *0.90),
IF(ISPICKVAL(Distance_From_London__c,">300m"),( base_fee__c *0.85),base_fee__c )))

Application period adjustment =
IF(ISPICKVAL(  Application_Period__c , "April-June"), ( Distance_from_london_amount__c -  Agreed_Additional_Discount_Amount__c ),
IF(ISPICKVAL(  Application_Period__c , "July-Sept"), ( Distance_from_london_amount__c * 0.75 -  Agreed_Additional_Discount_Amount__c ),
IF(ISPICKVAL(  Application_Period__c , "Oct-Dec"), ( Distance_from_london_amount__c * 0.5 - Agreed_Additional_Discount_Amount__c ),
IF(ISPICKVAL(  Application_Period__c , "Jan-March"), ( Distance_from_london_amount__c * 0.25 - Agreed_Additional_Discount_Amount__c ), Distance_from_london_amount__c ))))

As you can see, the three formulae are no where near 5000 characters long, but checking the syntax on the third formula says that there are over 22,000 characters....

So, the only thing I can think of is creating a field that isn't a formula, but simply copies the result from the Base Fee calculation fee as this would reset the character count. But I don't know how to do this.

Is there a bit of code I can use to pull the info from one field into another?

Thanks
Nicole