Functions can be used in chat normally, but those same functions dont run on command blocks for some reasons.
I tried with another function that seems to work (summon creeper), function name was "test", and it worked good.
The images will probably explain it better than myself ^^
You didn't attach any images.
Also, to better reproduce this issue, it might be useful if you could attach the affected function file.