Have another look at this link (already posted by @Daniel above) which shows the use of the hypeDocument.functions()
in a situation similar to yours.
Also attached is a basic example showing the use of hypeDocument.functions()
Hype_Functions_Call_JHSv1.hype.zip (12.4 KB)