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
AdrianaAdriana 

Separating compiled formulas.

Hi,
I'm trying to create a pretty big formula. I have broken it down in parts so that it does not exceed the 1300 characters restriction, but when I do sum up the different parts, the compilation is bigger than the allowed 5000 characters.
 
Is there any way to copy only the result (Value) of the formula into a new field, so that I can then sum up only the values and not carry all the compilation? I'm thinking something like the excel
Paste special-Value
 
Any help would be greatly appreciated!!
 
Thanks,
 
Adriana.
TCAdminTCAdmin
Hello Adriana,

The only way that I've been able to do this is through a field update.  You can then use a formula to generate a value and place it in to a text field.  Then you can use the text field within your formula so that the prior compile will not be included.  Unfortunately this does require that you have Enterprise or above to have the workflow rules and field updates.
AdrianaAdriana

Hi Chris,

Thanks so much for your reply. I have done that and it works but now the next problem is that the fields that create the "Value" need to be edited in order for the value to change, so the "value" won't really reflect the situation in real time. Have you been able to solve that problem?

TCAdminTCAdmin
Hello Adriana,
 
If you use the field update and use a workflow rule that triggers every time the record is saved then it should always be up-to-date.  You can do this by making the workflow rule trigger "record owner not equal to" and then leave the third field blank.  Since all records within the system require that there be an owner it will always trigger.
AdrianaAdriana

Hi Chris,

Thanks again for your quick reply. 

I did try using a record that is always present, but for example:

One of the formulas I'm using shows if we have a delay in our process and it sums up days even if the record is not updated or saved. For example: Until we don't receive certain document, it keeps adding days daily.

By using the field update, it won't add those days unless something is changed and it needs to be saved or edited.

Thanks,

Adriana.

TCAdminTCAdmin
Andriana,
 
That is correct.  The workflow rules will only trigger when a record is saved.  The only other option that you have is to use an sControl to generate the value each time a record is viewed.  An in-line sControl can go get the data and then display the most recent value.  This does take more skill than an sControl though but if you feel comfortable about using or learning the language it can be very powerful.
 
Let me know if you need further assistance with something like this.
AdrianaAdriana

Dear Chris,

If I do use an S-Control, would the data be updated everytime I ran a report?

I've never used S-Controls, but if it would serve my purpose, I'd be happy to learn how to use them.

Thanks,

Adriana.

TCAdminTCAdmin
Adriana,
 
Unfortunately you can't show an inline scontrol in a report.  The scontrol could run each time a user were to view a record which could update a field on that record.  That is one thing about the inline scontrols is that it doesn't require the user to anything, EXCEPT look at the record.
 
You can create an scontrol that would update all of your records with the most recent values but this can cause it's own issues do to the time required for a lot of records.  Scontrols work much better for short snippets of code and not the long projects.
 
If you are intersted in seeing this setup then send me an email and I'll get you access to one of my test orgs with an example.