# Unable to call a method from one module to another.

**URL:** <https://forum.servoy.com/t/unable-to-call-a-method-from-one-module-to-another/20872>\
**Category:** Questions\
**Created:** [October 5, 2022, 11:21am UTC](https://forum.servoy.com/t/unable-to-call-a-method-from-one-module-to-another/20872 "2022-10-05T11:21:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aijazalee889](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/aijazalee889/32/5129_2.png) [@aijazalee889](https://forum.servoy.com/u/aijazalee889)\
**Post date:** [October 5, 2022, 11:21am UTC](https://forum.servoy.com/t/unable-to-call-a-method-from-one-module-to-another/20872/1 "2022-10-05T11:21:51Z")

</div>

Hey, All

I am unable to call a method from one module to another module, how it can be done?

any suggestion or idea would be greatly appreciated.

Thanks  
Aijaz Ali

---

<div class="post-metadata">

**Author:** ![rph](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rph](https://forum.servoy.com/u/rph)\
**Post date:** [October 6, 2022, 12:19pm UTC](https://forum.servoy.com/t/unable-to-call-a-method-from-one-module-to-another/20872/2 "2022-10-06T12:19:49Z")

</div>

Hi

I’m not quite sure if I understand you right. If you have a module “A” and within this module you have a scope “myscope” and within that you have a function “myfunction” and then you have a module “B” and within this you want to call the function “myfunction”, then you have just to make sure module “A” is included in module “B” (solution property “moduleNames”) and then you can call it like this:

scopes.myscope.myfunction();

Be aware: you can only include one module in another but not visversa because of circulare dependency is not possible. So you can include module “A” ind module “B” but then you can not include module “B” in “A”.

Hope this helps.

Best  
Roland

---

<div class="post-metadata">

**Author:** ![aijazalee889](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/aijazalee889/32/5129_2.png) [@aijazalee889](https://forum.servoy.com/u/aijazalee889)\
**Post date:** [October 7, 2022, 4:42am UTC](https://forum.servoy.com/t/unable-to-call-a-method-from-one-module-to-another/20872/3 "2022-10-07T04:42:59Z")

</div>

Hi, Roland

Thanks for the answer.

Exactly I was doing that, now I have got it, by adding _module name_ in “moduleNames” property.

Thanks  
Aijaz Ali
