function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sanjay_SatyamSanjay_Satyam 

Formula to Return a Text Value as well as a Number Value

Hi, 

I have this formula which i need to write in Salesforce. This formula returns a Number Value in some cases and a Text values in others.

 

=IF(AND(C15=0,C26=0),0,IF(C15<>0,IF(OR(AND(C15>0,C26>0,((C26-C15)/C15)<1),AND(C15<0,C26<0,((C26-C15)/C15)<1)),((C26-C15)/ABS(C15)),IF(C15<C26,"F","U")),IF(C15<C26,"F","U")))

 

I tried putting this as a Number Formula but was not able to save as there are these F's and U's Also. Also tried putting as a Text by wrapping the number as a text, However this worked. But when i am using the text version of the formula on my Visualforce Page give a Internal Server error. On detail page it shows the values correctly. 

 

Is there any way i can use the Formula type as number and display the Text values also.....

 

Appreciate any help on this.

 

Thanks,
Sanjay

spraetzspraetz

If you're getting an internal server error, there's a bug in Salesforce's code.  You should contact support.