# Confused about asserta/2 when clause uses predicates from multiple modules

**URL:** https://swi-prolog.discourse.group/t/confused-about-asserta-2-when-clause-uses-predicates-from-multiple-modules/4237
**Category:** Help!
**Created:** [August 2, 2021, 10:22am UTC](https://swi-prolog.discourse.group/t/confused-about-asserta-2-when-clause-uses-predicates-from-multiple-modules/4237 "2021-08-02T10:22:21Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)
#### Post date: [August 3, 2021, 3:22pm UTC](https://swi-prolog.discourse.group/t/confused-about-asserta-2-when-clause-uses-predicates-from-multiple-modules/4237/2 "2021-08-03T15:22:35Z")

</div>

assert/1 asserts the clause in the current module context. If you merely qualify the head the clause is added to the qualified module, but the body remains in the context of the context module. If you want to assert as if asserted from some module, use

```
 asserta(TargetModule:(Head :- Body)).
```

---

_[View the full topic](https://swi-prolog.discourse.group/t/confused-about-asserta-2-when-clause-uses-predicates-from-multiple-modules/4237)._
