# Using descision tables?

**URL:** <https://discourse.nodered.org/t/using-descision-tables/82855>\
**Category:** General\
**Created:** [14 November 2023 15:10 UTC](https://discourse.nodered.org/t/using-descision-tables/82855 "2023-11-14T15:10:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre78](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@andre78](https://discourse.nodered.org/u/andre78)\
**Post date:** [14 November 2023 15:10 UTC](https://discourse.nodered.org/t/using-descision-tables/82855/1 "2023-11-14T15:10:47Z")

</div>

Hi,

Are there ways to process messages based on a decision table? I am looking into some complex automation scenarios, and can't get myself to build out every variation manually. For example a number of different states like:

- time of day
- lighting scene preselected
- time since last trigger
- mood of my son's hamster
- ...

And then act on the result, for example change something within msg.payload or choose a specific output connector to send the data to.

I know that all of this can be done with individual nodes and haven't found anything related to "decision table" - maybe for a good reason?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [14 November 2023 17:13 UTC](https://discourse.nodered.org/t/using-descision-tables/82855/2 "2023-11-14T17:13:11Z")

</div>

You might try searching the flows site for "finite state machine" which might possibly be related to what you are asking for?

---

<div class="post-metadata">

**Author:** ![andre78](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@andre78](https://discourse.nodered.org/u/andre78)\
**Post date:** [14 November 2023 17:30 UTC](https://discourse.nodered.org/t/using-descision-tables/82855/3 "2023-11-14T17:30:06Z")

</div>

Interesting, that concept is new for me. I need to wrap my head around how to transfer it to my use case.

Thank you so far!

---

<div class="post-metadata">

**Author:** ![AmberAltman](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@AmberAltman](https://discourse.nodered.org/u/AmberAltman)\
**Post date:** [7 December 2023 12:07 UTC](https://discourse.nodered.org/t/using-descision-tables/82855/4 "2023-12-07T12:07:30Z")

</div>

Certainly! In Node-RED, you can emulate a decision table by using input nodes, a Switch node for conditions, and Function nodes for actions. It's a modular and scalable approach, offering flexibility in handling diverse automation scenarios without manual configuration for each variation.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 February 2024 12:07 UTC](https://discourse.nodered.org/t/using-descision-tables/82855/5 "2024-02-05T12:07:44Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
