# Why sometimes the amend/index doesn't work?

**URL:** <https://forum.kx.com/t/why-sometimes-the-amend-index-doesnt-work/12679>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [October 11, 2022, 3:34pm UTC](https://forum.kx.com/t/why-sometimes-the-amend-index-doesnt-work/12679 "2022-10-11T15:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivo1](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@vivo1](https://forum.kx.com/u/vivo1)\
**Post date:** [October 11, 2022, 3:34pm UTC](https://forum.kx.com/t/why-sometimes-the-amend-index-doesnt-work/12679/1 "2022-10-11T15:34:00Z")

</div>

In below code, **a1** doesn’t work. Any ideas why?

&nbsp;

```
myObj: (5 7; (`a; `b ; (4 5)));

a3:.[myObj; 1 2 1; {count x}]; // i.e. ((5 7);(`a;`b;4 1))
a2:.[myObj; 1 2; {count x}]; // i.e. ((5 7);(`a;`b;2))
a1:.[myObj; 1; {count x}]; // i.e. it doesn't work
a0:.[myObj; (); {count x}]; // i.e. 2

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![gyorokpeter-kx1](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@gyorokpeter-kx1](https://forum.kx.com/u/gyorokpeter-kx1)\
**Post date:** [October 11, 2022, 3:45pm UTC](https://forum.kx.com/t/why-sometimes-the-amend-index-doesnt-work/12679/2 "2022-10-11T15:45:00Z")

</div>

It’s because the dot operator always requires a list as the index. 1 2 1, 1 2 and () are lists, 1 is not. It works if you enlist it.

a1:.[myObj; enlist 1; {count x}];
