# Dynamic Attributes Check

Use these questions to prepare for the Kanoa Ops certification exam.

<details>
<summary>What is the difference between a dynamic attribute and a custom property?</summary>

A dynamic attribute stores a value that changes over time as time-stamped events, so you can ask what the value was at any moment. A custom property is configuration that rarely changes and has no event history. See [Dynamic Attributes](../09-dynamic-attributes/index.md).

</details>

<details>
<summary>What has to be done before a dynamic attribute can record values for an asset?</summary>

The attribute must be defined and then **linked** to the asset. Events are recorded against that attribute-asset link. See [Create Dynamic Attributes](../09-dynamic-attributes/1-create-dynamic-attributes.md).

</details>

<details>
<summary>Name two ways a dynamic attribute value can be recorded without a script.</summary>

Collected automatically from a PLC tag configured as the attribute's data source, or entered by a person, either on the **Attribute Events** screen or through an operator screen built from the `dropdownSelector` or `textEntry` views. See [Create Dynamic Attributes](../09-dynamic-attributes/1-create-dynamic-attributes.md).

</details>

<details>
<summary>Why give operators an entry screen instead of the Attribute Events screen?</summary>

Attribute Events is an administrative screen for reviewing and correcting history. Kanoa's `kanoa/mes/asset/attributes` views give operators a simple control that records a time-stamped event for the right asset and attribute. See [Dynamic Attributes](../../../kanoa-ops/dynamic-attributes.md).

</details>

<details>
<summary>Which function returns the value of a dynamic attribute at a given moment?</summary>

`system.kanoa.attribute.getPreviousAttributeEvent(assetId, attributeId, tStamp)` returns the most recent event before `tStamp`; pass `system.date.now()` to get the value in effect right now. Use `getAttributeEvents` for the full history over a time range. See [Dynamic Attributes](../../../kanoa-ops/dynamic-attributes.md).

</details>

<details>
<summary>When should you not use a dynamic attribute?</summary>

When Kanoa already has a natural home for the data: counters for counts, state events for downtime, item states for scrap, and custom properties for stable configuration. Use a dynamic attribute when the value is custom, changes over time, and the time it changed matters. See [Dynamic Attributes](../../../kanoa-ops/dynamic-attributes.md).

</details>
