I built a gauge on the Opportunity object. I'm clearly missing something as this simple formula is erring...
var total_user = #CALC_SUM ( Contract_Users__c | StageName == "Closed - Won");
return total_user;
Error illegal character (line #2) in formula: function wrapper() { var total_user = #CALC_SUM ( Contract_Users__c | StageName == "Closed - Won"); return total_user; } wrapper();
Contract_Users__c is an integer field.
When I try to add the Object's integration name to change formula to #CALC_SUM.opportunity (... I receive the error...
Cannot find relationship opportunity
According to Chapter 6 of documentation,
You can also run Group Functions on the entire set of an Object’s records. For that use the Object’s integration name instead of a specific Relationship name, such as:
#CALC_SUM.invoice( amount | true )
So this should work, right? What am I missing?
Hello,
Please try using "=" instead of "==" for comparing values inside the #CALC_SUM API.
Thank you,
Gian
Thanks for the quick response. I made the change, but it still throws the same error.
Hello,
Please add the object name to the API.
var a = #CALC_SUM.object_name( 1 | name="Value");
Thank you,
Gian
And that's when I get the... Cannot find relationship opportunity error. In this case both the object name and integration name are the same.
You are correct. You will use the object's integration name for the #CALC_SUM API. If you are using the calc_sum on the same object, please use the object's integration name. If you are using it to sum up the related object's value, please use their relationship name.
#CALC_SUM.RXXXX( 1 | true ) /*for related calc_sum*/
#CALC_SUM.object_integ_name( 1 | true ) /*for same object calc_sum*/
Thank you,
Gian
That's the kicker. I do have the object integration name, but it's still throwing the 'Cannot find relationship [my integration name]' error.
Can you try doing a simple CALC_SUM in the object you're using just to verify what is causing the problem? I just tested both of the syntax and it works on my end. May I also know what Rollbase version are you using? I tried it in 3.x and it works fine.
Got to love this. Came in this morning, logged back in, changed nothing and it worked. Only difference was a server restart last night after some change was put in place. Can only imagine what that was. At least I know I'm not crazy. Thanks for working through it with me though.
No worries. Glad that the server restart helped. Let me know if you need anything else.
Thank you,
Gian
Got to love this. Came in this morning, logged back in, changed nothing and it worked. Only difference was a server restart last night after some change was put in place. Can only imagine what that was. At least I know I'm not crazy. Thanks for working through it with me though.
Flag this post as spam/abuse.