# Pivot table not working when migrating to manifest Version: 5

**URL:** https://forums.creativeclouddeveloper.com/t/pivot-table-not-working-when-migrating-to-manifest-version-5/5966
**Category:** UXP Plugin API
**Created:** [March 3, 2023, 4:44am UTC](https://forums.creativeclouddeveloper.com/t/pivot-table-not-working-when-migrating-to-manifest-version-5/5966 "2023-03-03T04:44:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![MalbertCunha](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/malbertcunha/32/2760_2.png) [@MalbertCunha](https://forums.creativeclouddeveloper.com/u/MalbertCunha)
#### Post date: [March 3, 2023, 4:44am UTC](https://forums.creativeclouddeveloper.com/t/pivot-table-not-working-when-migrating-to-manifest-version-5/5966/1 "2023-03-03T04:44:20Z")

</div>

Hello! The title itself says my problem. 🥲

 ![Capturar2](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/6/62aafa2acf52d4d88d77632d2f16b2da119ccf6d.png)  
html

```auto
	<table id="tabela">
		<thead>
			<tr>
				<th>Nome</th>
				<th>Idade</th>
				<th>Profissão</th>
			</tr>
		</thead>
		<tbody>
		</tbody>
	</table>

```

js

```auto
    const pessoas = [
        { nome: 'João', idade: 25, profissao: 'Engenheiro' },
        { nome: 'Maria', idade: 30, profissao: 'Médica' },
        { nome: 'Pedro', idade: 35, profissao: 'Professor' },
        { nome: 'Mauricio', idade: 45, profissao: 'Laboratorista' },
        { nome: 'Mauro', idade: 46, profissao: 'Vendedor' },
        { nome: 'Miguelzim', idade: 43, profissao: 'Vigilante' },
        { nome: 'Shulipa', idade: 16, profissao: 'Estudante' },
        { nome: 'Deusa', idade: 68, profissao: 'Aposentada' },
    ];
  function preencherTabela() {
          try {
            const tabela = document.querySelector('#tabela tbody');
  
            pessoas.forEach(pessoa => {
                const linha = document.createElement('tr');
                const colunaNome = document.createElement('td');
                const colunaIdade = document.createElement('td');
                const colunaProfissao = document.createElement('td');
  
                colunaNome.textContent = pessoa.nome;
                colunaIdade.textContent = pessoa.idade;
                colunaProfissao.textContent = pessoa.profissao;
  
                linha.appendChild(colunaNome);
                linha.appendChild(colunaIdade);
                linha.appendChild(colunaProfissao);
  
                tabela.appendChild(linha);
            });
          } catch (err) {console.log(err) }
      }

     preencherTabela();

```

Can anyone point me to a solution?

---

<div class="post-metadata">

### Author: ![Maher](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/maher/32/1432_2.png) [@Maher](https://forums.creativeclouddeveloper.com/u/Maher)
#### Post date: [March 3, 2023, 6:36am UTC](https://forums.creativeclouddeveloper.com/t/pivot-table-not-working-when-migrating-to-manifest-version-5/5966/2 "2023-03-03T06:36:27Z")

</div>

where does `pessoas` come from and is it a valid object?

also try opening the Debug window and see if you get any error messages under console tab

---

<div class="post-metadata">

### Author: ![MalbertCunha](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/malbertcunha/32/2760_2.png) [@MalbertCunha](https://forums.creativeclouddeveloper.com/u/MalbertCunha)
#### Post date: [March 3, 2023, 11:38am UTC](https://forums.creativeclouddeveloper.com/t/pivot-table-not-working-when-migrating-to-manifest-version-5/5966/3 "2023-03-03T11:38:45Z")

</div>

@Maher , I edited and added the rest of the code in the post, as for the console, it actually pointed out an error to me, which did not occur in version 4 of the manifest, I corrected it and everything worked perfectly. Thanks. 🤝

---

<div class="post-metadata">

### Author: ![Maher](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/maher/32/1432_2.png) [@Maher](https://forums.creativeclouddeveloper.com/u/Maher)
#### Post date: [March 3, 2023, 11:42am UTC](https://forums.creativeclouddeveloper.com/t/pivot-table-not-working-when-migrating-to-manifest-version-5/5966/4 "2023-03-03T11:42:10Z")

</div>

glad things worked!

sharing the solution when possible might help others solve their own issues.

I encourage you to share the cause/solution if you can.

---

<div class="post-metadata">

### Author: ![MalbertCunha](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/malbertcunha/32/2760_2.png) [@MalbertCunha](https://forums.creativeclouddeveloper.com/u/MalbertCunha)
#### Post date: [March 3, 2023, 11:53am UTC](https://forums.creativeclouddeveloper.com/t/pivot-table-not-working-when-migrating-to-manifest-version-5/5966/5 "2023-03-03T11:53:12Z")

</div>

@Maher Perfect placement  
The cause of the error:  
I used one of the Developer Tools templates, because it is about some studies that I am doing, I added all the html and js codes only in the Index.htm file and I had forgotten to delete the codes from the Index.js

 ![Captura de tela 2023-03-03 085205](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/c/ca737442ede4c2b73a6598e69f1c53fc3669025a.jpeg)  
The curious thing is that in manifest 4 this error did not occur.
