Question

CTA comments: percentages formatting for tokens

  • 22 February 2016
  • 8 replies
  • 91 views

When I write a comment inside the Action Type section for a CTA rule, and when I select a token (which is a percentage field in Salesforce), the comment that ends up in the Chatter feed looks like this: "Moving average for 'Sum Feature Usage Actions' performed in the past week has dropped by -45.97495527728086  over the average of the prior 4 weeks". Is there any way to get rid of the decimals?

8 replies

Userlevel 7
Badge +6
If it's not possible in Gainsight, which seems very possible, have you considered creating a calculated field in Salesforce that rounds the number? The field wouldn't need to be visible on any of the page layouts; it could just be hanging out quietly behind the scenes.
The thing is that the field with too many decimals is actually a calculated field in Gainsight, and it's comparing Used Users for the past 2 weeks to Used Users the prior 2 weeks. So I have to access 4 weeks worth of Used Users metric through Salesforce if I create a field there (because I don't need a static picture of the today's situation, I need this over time). Is there any way to do this?

Userlevel 5
The avg would result in decimal places and no way to avoid it as of now. I would say that the default should be two decimal places at worst and configurable at best. 
Are there any updates on this? We're facing the same issue in CTA comments and Scorecard comments. We would love to be able to round to two decimals to make the data more user-friendly to the CSMs.
Userlevel 5
Pat - The calculated field avg is fixed to two decimal places some time back. Hope you are not referring to that. The issue that you are seeing is specific to the MDA source? 
Badge +1
This reply was created from a merged topic originally titled Need choice for decimal places with calculated fields in Rules Engine..



I am using the calculated fields for averages based on Matrix data.  The rule works, but when I add the calculated field as a token to the comment section in the scorecard, the number (percentage) returned has 15 decimal places.  Is there a way that we could have a choice on how many decimal places we want for calculated fields in the rules engines?
Wondering if there's an update on this.  We are attempting to write meaningful comments to milestones, CTA's, etc. using tokens, but the comments carry unnecessary decimal places (sometimes up to 8 decimal places).  The tokens we are using pull from calculated fields in Salesforce and also from calculated fields in Gainsight.  Either way, the comments are nearly unreadable without the ability to round them (formatting would also be nice, but that's for another topic).  We have considered adding rounded fields in Salesforce to house the values we want to write, but that would require hundreds of unnecessary fields in Salesforce.
Badge
I am also seeing this issue with the new Percentage field type added to MDA. We have gone to extensive lengths to add new field with the Percentage type, migrate data and update an external job that imports data into MDA, only to find the token fields CTA comments don't pick up the percentage format.

Reply