# Force Ignition tag to bad quality and null or False value

**URL:** <https://forum.inductiveautomation.com/t/force-ignition-tag-to-bad-quality-and-null-or-false-value/110308>\
**Category:** Module Development\
**Tags:** ignition81\
**Created:** [September 1, 2025, 1:05pm UTC](https://forum.inductiveautomation.com/t/force-ignition-tag-to-bad-quality-and-null-or-false-value/110308 "2025-09-01T13:05:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 1, 2025, 1:05pm UTC](https://forum.inductiveautomation.com/t/force-ignition-tag-to-bad-quality-and-null-or-false-value/110308/1 "2025-09-01T13:05:01Z")

</div>

I have a driver module. It implements the **Device**

When I disable the device or delete the device, I would like to pass all tags to BAD Quality and to set valeur of Boolean tags to False ou Integer tags to 0.

I don’t find How I can find the BuiltinDataType from item.getReadValueId() or from node.getUaVariableNode() to adjust the right value

```

public void shutdown() {  
logger.info("shutdown()");

```python
subscriptionModel.shutdown();

deviceContext.getSubscriptionModel()
		.getDataItems(deviceContext.getName())
		.forEach(item ->
			{
				String name = deviceContext.getName();

				String identifier = item.getReadValueId().getNodeId().getIdentifier().toString();
				logger.info("getIdentifier()={}",identifier);
				identifier = identifier.replace(String.format("[%s]",name),"");
				// Dynamic Nodes
				DynamicNode node = dynamicNodeManager.findNode(identifier);
				if (node != null){

					// logger.info("node.getUaVariableNode().getDataType()={}",node.getUaVariableNode().getDataType().getType().toString());

					if (node.getUaVariableNode().getDataType().equals(BuiltinDataType.Boolean)){
						item.setValue(new DataValue(new Variant(false),StatusCode.BAD));
					} else {
						item.setValue(new DataValue(null,StatusCode.BAD));
					}
				} else {
					item.setValue(new DataValue(null,StatusCode.BAD));
				}
			});

// folderManager
dynamicNodeManager.shutdown();
staticNodeManager.shutdown();

// Arrêt de l'ExecutorService
executor.shutdownNow();

logger.debug("end shutdown {}",getName());

```

}

```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 1, 2025, 1:25pm UTC](https://forum.inductiveautomation.com/t/force-ignition-tag-to-bad-quality-and-null-or-false-value/110308/2 "2025-09-01T13:25:42Z")

</div>

`UaVariableNode::getDataType` returns the `NodeId` of the DataType.

You can compare that to `BuiltinDataType.Boolean.getNodeId()` or use `BuiltinDataType.fromNodeId` on the DataType and compare directly against `BuiltinDataType.Boolean`.

FWIW, in terms of OPC UA compliance, it is not allowed that a value accompanies a bad severity StatusCode in a DataValue. You must use something like `Uncertain_LastUsableValue` like we do.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 1, 2025, 2:51pm UTC](https://forum.inductiveautomation.com/t/force-ignition-tag-to-bad-quality-and-null-or-false-value/110308/3 "2025-09-01T14:51:13Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/1/b1204854b99c40eb2eff1484fe96879740502d13.png)

@Kevin.Herron What is a bit annoying in Designer is the boolean apparence. We don’t have any “red” alert for an invalid quality like for tag other type.

If it was possible to have the checkbox border red if tag quality is not Good…

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 1, 2025, 2:59pm UTC](https://forum.inductiveautomation.com/t/force-ignition-tag-to-bad-quality-and-null-or-false-value/110308/4 "2025-09-01T14:59:20Z")

</div>

I opened a ticket about that 4 years ago 🙃
