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

Workflow Formula Field Update

Hi Guys,

i have a Formula field that is getting Avg values Like 1.3,1.4.up to 3.9 so i need to round the Values As if the Value is 0.4 then Round to '0' and also if the value is 0.5 to 0.9 then i need to round the Value to 1 how can i achive this using workfloe field update

Rowallim TechnologyRowallim Technology
Hi Satya
You can use "ROUND(number,num_digits)" for this requirements in the workflow rule.
Hope it will help you.
Please mark it best answer if it helps.
SandhyaSandhya (Salesforce Developers) 
Hi Satya Reddy ,

You can use round function in your formula field.

Please refer below link.
Hope this helps you!

If this helps you mark it as solved.

Thanks and Regards
Alexandru IleanaAlexandru Ileana

Try something like ROUND( YOUR_VALUE_OR_FIELD, 1 )
This should "Round a number to a specified number of digits" as explained in the tooltip to the right.

Let me know if you need any more help.

Best Regards,
Hi Alex,

for Rounding the Value it always giving the Lower Value only.i,e from 1.2 to 1.9 it always giving 1 only. so we need form 1.0 to 1.4 it was 1 and also from 1.5 to 1.9 it was 2 only like this

Alexandru IleanaAlexandru Ileana

I have tried adding a formula field with the following formula and gave access only to an admin:
ROUND(1.4, 0)
This now gives 1.0

I have then changed the formula to:
ROUND(1.5, 0)
This returns 2.0

Try it this way and let us know if it works.

i have tried like this ROUND(Test_VOC__c ,0) but it always giving FLOOR value only
for Hard coing the Value Like ROUND(1.4,0) and ROUND(1.5,0) it was working fine. But by giving the field name it always giving the FLOOR  value only
Alexandru IleanaAlexandru Ileana

I think it would help if you show the full formula you are trying to use.
Also please let me know what type of field you are using (I used Formula (Number)) and in the object view I see: Decimal Places 1
Look at your custom object and then on Fields.

If your formula is more complex than what you have written, then there may be other values changing the result.
Also you mentioned field updates. That is very different from a formula field. This is just a formula type field correct? Not a workflow rule using a field update?

If nothing else works... then try creating a new object with the original field you are trying to convert via formula and populate it with similar data. If it works for that new field, then maybe you have written a trigger or some other code which automatically changes the value somehow (on update). It is very unlikely, but it is a possibility. Updates can happen in a chain if they are written that way.
Hi Ileana,

Actually thet is a number field. from another lookup object using Rollup helper i am calculating the for that average it is giving the for this using workflow field update i have to round the values As well..
Alexandru IleanaAlexandru Ileana

I have also forgot to mention one other thing. Please let us know the type of field that Test_VOC__c is decalred as and give an example of 2 3 lines of records in a view for it (or SOQL select statement) so I can understand what value it is trying to convert
Hi Ileana,

Test_VOC__c  is a number (18,0) field
Alexandru IleanaAlexandru Ileana

So if I understood correctly, you are trying something like this:
returns via formula: ROUND( Main_Object.A_LOOKUP_FIELD__r.Test_VOC_VALUE_TO_GET__c, 0 )

Try simplifying your formula (for testing) to: A_LOOKUP_FIELD__r.Test_VOC_VALUE_TO_GET__c
and then do an SOQL query like SELECT A_LOOKUP_FIELD__r.Test_VOC_VALUE_TO_GET__c, Test_VOC__c FROM Main_Object
and check to see if all values are identical. They should be! :)

Does this make sense?

Also when talking about field updates, I was refering to App Setup -> Create -> Workflow & Approvals -> Field Updates. I imagine you are not using that.

I am unfamiliar with that solution ... so if you do not manage to find a solution in the end, I suggest you contact their support. They should be able to know weter or not that field has any special logic that prevents you for doing this average.