# \[IGN-11942\] When working with a dataset type, date values are lost when restarting the computer

**URL:** <https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [September 18, 2025, 12:49pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751 "2025-09-18T12:49:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![matheus.santos](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@matheus.santos](https://forum.inductiveautomation.com/u/matheus.santos)\
**Post date:** [September 18, 2025, 12:49pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/1 "2025-09-18T12:49:56Z")

</div>

Hello everyone,

I am working with dataset memory tags with four columns, the first of which is a date type with the index “DATE” storing a date. When I restart my machine, I have noticed that the values allocated in this column are blank. I have no idea what could be causing this. I will share the script I am using to write this data to my columns.

```python
def onScheduledEvent():
    # Caminho do tag
    pathDataset = "[edge]Plant/Prod_Data/TAG_B_TESTE"

    # Ler o dataset atual
    datasetAtual = system.tag.readBlocking([pathDataset])[0].value
    pyDataset = system.dataset.toPyDataSet(datasetAtual)

    # Leitura dos valores dos tags
    wt01 = system.tag.readBlocking(["[edge]Ramp/Ramp1"])[0].value
    wt02 = system.tag.readBlocking(["[edge]Ramp/Ramp4"])[0].value
    wt03 = system.tag.readBlocking(["[edge]Ramp/Ramp7"])[0].value
    dataAtual = system.date.now()

    # Criar lista de linhas
    linhas = []
    for linha in pyDataset:
            linhas.append([linha["DATE"], linha["WT01"], linha["WT02"], linha["WT03"]])

    # Adicionar nova linha com data válida
    linhas.append([dataAtual, wt01, wt02, wt03])

    # Cabeçalhos
    colunas = ["DATE", "WT01", "WT02", "WT03"]

    # Criar novo dataset
    novoDataset = system.dataset.toDataSet(colunas, linhas)

    # Escrever no tag
    system.tag.writeBlocking([pathDataset], [novoDataset])

```

 ![Captura de tela 2025-09-18 082535](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/5/850e9ce0570a4a7c151a3302b195b8135a85514d.png)

 ![Captura de tela 2025-09-18 082649](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/1/418c88ccd138e4ba7ea0a4369e1a32b233b6bc08.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 18, 2025, 12:58pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/3 "2025-09-18T12:58:19Z")

</div>

As transistor said, you need to format code properly for us to be and to read it properly.

That said, I have a few remarks already:

- batch tag reads
- You should be using the built-in `addRow` function, it would make the whole thing much simpler
- we need to know more about the script context: what triggers it ?

---

<div class="post-metadata">

**Author:** ![matheus.santos](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@matheus.santos](https://forum.inductiveautomation.com/u/matheus.santos)\
**Post date:** [September 18, 2025, 1:05pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/4 "2025-09-18T13:05:36Z")

</div>

Hi @pascal.fragnoud

I updated the code block to be formatted correctly. The trigger for it is a Scheduled Gateway designed to record the date every hour.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 18, 2025, 8:38pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/5 "2025-09-18T20:38:01Z")

</div>

I condenced your code. I also changed it to use the `addRow` function. Try it and see if you have better results.

```python
def onScheduledEvent():
    # Caminhos de tag
    caminhos = ["[edge]Plant/Prod_Data/TAG_B_TESTE","[edge]Ramp/Ramp1","[edge]Ramp/Ramp4","[edge]Ramp/Ramp7"]

    # Leia todos os valores de tags em uma única chamada
    datasetAtual,wt01,wt02,wt03 = [qv.value for qv in system.tag.readBlocking(caminhos)]

	# Obtenha a data atual
    dataAtual = system.date.now()

    # adicionar linha ao conjunto de dados
    novoDataset = system.dataset.addRow(datasetAtual,[dataAtual,wt01,wt02,wt03])

    # Escrever para marcar
    system.tag.writeBlocking([pathDataset], [novoDataset])

```

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 18, 2025, 8:46pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/6 "2025-09-18T20:46:46Z")

</div>

I think the 2nd parameter to `addRow` should be a simple list, instead of a list of lists.  
`addRows` would take a list of lists.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 18, 2025, 8:55pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/7 "2025-09-18T20:55:33Z")

</div>

Yep, that's what I get for not looking.

---

<div class="post-metadata">

**Author:** ![matheus.santos](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@matheus.santos](https://forum.inductiveautomation.com/u/matheus.santos)\
**Post date:** [September 19, 2025, 11:00am UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/8 "2025-09-19T11:00:27Z")

</div>

I tried both methods, `addRow` and `addRows`, and neither of them worked for me.

The data was saved, but when restarting the machine, the date column still appears blank as if nothing had been saved in the history.

Before turning off the computer:

 ![Captura de tela 2025-09-19 074743](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/0/f0f82316182fd5f41e50f434b40bac8330af38f9.png)

After turning off the computer:

 ![Captura de tela 2025-09-19 075206](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/771ff6f6425277559e2659003010f0425670518d.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 19, 2025, 12:20pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/9 "2025-09-19T12:20:57Z")

</div>

There must be something about that column’s type, since the other one are just fine.  
Can you try adding a new column of type datetime and see if it does the same thing ?

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 19, 2025, 12:33pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/10 "2025-09-19T12:33:59Z")

</div>

Or add a column of type string and typecast the date into it, to see if it’s a type issue or data missing issue.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 19, 2025, 12:42pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/11 "2025-09-19T12:42:37Z")

</div>

> [@matheus.santos](#):
>
> Before turning off the computer

What computer are you turning off?

---

<div class="post-metadata">

**Author:** ![matheus.santos](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@matheus.santos](https://forum.inductiveautomation.com/u/matheus.santos)\
**Post date:** [September 19, 2025, 2:43pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/12 "2025-09-19T14:43:12Z")

</div>

The computer I am turning off is mine, which hosts the Gateway and Designer

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 19, 2025, 3:42pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/13 "2025-09-19T15:42:17Z")

</div>

What happens if you only restart the gateway ?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 19, 2025, 4:13pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/14 "2025-09-19T16:13:31Z")

</div>

Are there any errors in the gateway logs? Upload the wrapper log if you're not sure.

---

<div class="post-metadata">

**Author:** ![matheus.santos](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@matheus.santos](https://forum.inductiveautomation.com/u/matheus.santos)\
**Post date:** [September 19, 2025, 5:06pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/15 "2025-09-19T17:06:43Z")

</div>

@pascal.fragnoud

Due to restrictions at the company where I work, it seems that the gateway reset commands are disabled. I was denied access when executing the commands.

”Acesso negado” = “Access denied”

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a5aa7ae3af88f8570a7286f26033d61e14d02f09.png)

---

<div class="post-metadata">

**Author:** ![matheus.santos](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@matheus.santos](https://forum.inductiveautomation.com/u/matheus.santos)\
**Post date:** [September 19, 2025, 5:10pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/16 "2025-09-19T17:10:00Z")

</div>

@paul-griffith

I did not encounter any errors when registering the gateway.  
everything seems to be fine

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 19, 2025, 5:16pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/17 "2025-09-19T17:16:22Z")

</div>

Run the command prompt as administrator…or navigate to the shutdown/startup short cuts, right click and run as administrator

---

<div class="post-metadata">

**Author:** ![matheus.santos](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@matheus.santos](https://forum.inductiveautomation.com/u/matheus.santos)\
**Post date:** [September 19, 2025, 5:32pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/18 "2025-09-19T17:32:46Z")

</div>

@robertm

The administrator privileges are blocked on this machine. I am restarting the gateway “manually” by resetting the computer.

I tested it with a column defined “DATE\_TEST\_STRING" as a string type to see if the data would be lost.

before restarting the machine

 ![Captura de tela 2025-09-19 132744](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1c7d2b8466056d22b03a12e8bfdf0d9ace74d67e.png)

after restarting the machine

 ![Captura de tela 2025-09-19 142414](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/b/1b5fb3c5af4fede354319928f888df2d01040a39.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 19, 2025, 7:01pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/19 "2025-09-19T19:01:04Z")

</div>

> [@matheus.santos](#):
>
> everything seems to be fine

Except that values don’t seem to be making it to the internal DB.

I’m not sure what registering the gateway has to do with your issue. That was not the question that Paul asked.

Something appears to be interfearing with a memory tag persisting its value, so I at least would expect there to be some type of error, even if it’s only listed in the wrapper log.

Upload a copy of your wrapper log. If you don’t know where to get that, then ask that question.

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [September 19, 2025, 7:05pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/20 "2025-09-19T19:05:39Z")

</div>

What locale is being used on your system?

Edit: If you are running into the bug I think you are then the workaround would be to set the gateway’s language to English by adding this additional parameter to the ignition.conf file. Just make sure you replace the `X` with the next available integer according to your .conf file.

`wrapper.java.additional.X=-Duser.language=en`

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 19, 2025, 7:21pm UTC](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751/21 "2025-09-19T19:21:24Z")

</div>

So the data is there, just some issue with persistence on date\_time type.

[Next page](https://forum.inductiveautomation.com/t/ign-11942-when-working-with-a-dataset-type-date-values-are-lost-when-restarting-the-computer/110751.md?page=2)
