Hi @BK
Maybe you can refer to the content in these links.
[https://stackoverflow.com/questions/30127534/mtd-function-not-working-with-scope
Best regards,
Percy Tang
If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".