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
Admin_dev.ax1029Admin_dev.ax1029 

Help needed in formula field

Hi Folks,

Iam kinda hard in figuring out the formula field for this since i don't see Is changed in formula.

 

Is it possible to calculate how many times the case status has been changed from "Developed" to "Working","New","Assigned", "Under review","Acknowledge" i couldn't figure out this one since i can't find Ischanged in formula .

 

TIA!

 



Best Answer chosen by Admin (Salesforce Developers) 
BA_AdminBA_Admin

Try this

 

AND(ISCHANGED(Status),
ISPICKVAL( PRIORVALUE(Status),"Developed"),
(OR(ISPICKVAL(Status,"New"),ISPICKVAL(Status,"Assigned"),ISPICKVAL(Status,"Under Review"),ISPICKVAL(Status,"Acknowledged"),ISPICKVAL(Status,"Working"))))

All Answers

Shashikant SharmaShashikant Sharma

No it is not possible to figure out directly from one formula as for this you have to fo 

formula value  = formula value + 1, that requires using a formula field inside it's formula that is not possible , but you can do it other way round , using trigger or using workflow and field update 

Admin_dev.ax1029Admin_dev.ax1029

I appreciate for your reply, but i think i have rememeber using formula in formula field before, but even though not quite sure how to implement this one , apart from this how could we do it by WFR i mean what could be the field update

SAPOCSAPOC

ISCHANGED function is available only in:

  • Assignment rules
  • Validation rules
  • Field updates
  • Workflow rules if the trigger type is set to Every time a record is created or edited.

More Information :https://help.salesforce.com/apex/htviewhelpdoc?id=customize_functions.htm&language=en#ISCHANGED

 

i am not sure if it is possible to get number of times case status was changed but you can view how status was changed by adding Case history related list to Case Pagelayout.

Admin_dev.ax1029Admin_dev.ax1029

Thx,

  We already have case history as related list even i could create a report on the casehistory to see how many times the staus has been changed , but iam trying to figure out  to display a particular number on case itself about how many times status has been changed.

Admin_dev.ax1029Admin_dev.ax1029

Shashikanth,

             I came up with this formula in WFR, i created a number field (Number__c) and in field update for this workflow rule i gave (Number__c + 1) , but i need to calculate the status change only if it moves from "Developed", here is my formula field right now this calculates everytime when the status is changed to below fields but i want this to calculate only when status is moved from "Developed", Any idea on the modification.

 

ISCHANGED(Status)
  && (OR(ISPICKVAL(Status,"New"),ISPICKVAL(Status,"Assigned"),ISPICKVAL(Status,"Under Review"),ISPICKVAL(Status,"Acknowledged"),ISPICKVAL(Status,"Working")))



BA_AdminBA_Admin

Try this

 

AND(ISCHANGED(Status),
ISPICKVAL( PRIORVALUE(Status),"Developed"),
(OR(ISPICKVAL(Status,"New"),ISPICKVAL(Status,"Assigned"),ISPICKVAL(Status,"Under Review"),ISPICKVAL(Status,"Acknowledged"),ISPICKVAL(Status,"Working"))))

This was selected as the best answer
Shashikant SharmaShashikant Sharma

I think you got me wrong what I wanted to say was you can not use a formula field inside it's formula. Any other formula field can be used in a formula of another formula field.

Ex ; Formula Field1 , FormulaField 2

You can use f2 in f1's formula but can not use f1 in it's own formula other wise it will become a recursive formula which will never end.