{"section":"known-issues","requestedLocale":"en","requestedSlug":"obtertotaldepontos-function-does-not-work-inside-the-automatic-field","locale":"en","slug":"obtertotaldepontos-function-does-not-work-inside-the-automatic-field","path":"docs/en/known-issues/Master Data/obtertotaldepontos-function-does-not-work-inside-the-automatic-field.md","branch":"main","content":"## Summary\n\nThe function ObterTotalDePontos used inside \"Calculated Fields\" does not work as expected and gives the following error message: he name 'campoScore' does not exist in the current context\n\n## Simulation\n\n1.  Access MasterData and create an automatic field\n2.  Create a simple function that uses ObterTotalDePontos.  Ex:\n\n    if ( ObterTotalDePontos(campoScore) > 0 ) \\{ \n    return 1; \n    \\} else \\{ \n    return 0; \n    \\}\n    \n3. Error: The name 'campoScore' does not exist in the current context\n\n## Workaround\n\nDepending on the what the account is attempting to do, a solution could be as simple as implementing an external middleware to calculate the fields and handle condition flow alongside MasterData's triggers."}