Pass data throught a button to SQL Table

I mean the part you shown in the first picture where input are required

This is what I see importing your flow

Does the input data (dropdown and input text) remain equal?

Ah, apologies.

[
    {
        "id": "bce72d0f261b67cb",
        "type": "ui_button",
        "z": "7c13b8452619581b",
        "name": "",
        "group": "2733e4a59af46689",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Carica",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 318,
        "y": 496,
        "wires": [
            [
                "bf23e13acd4755f5"
            ]
        ]
    },
    {
        "id": "bf23e13acd4755f5",
        "type": "change",
        "z": "7c13b8452619581b",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "UserInputTip",
                "pt": "msg",
                "to": "UserInputTip",
                "tot": "flow"
            },
            {
                "t": "set",
                "p": "TextInput",
                "pt": "msg",
                "to": "TextInput",
                "tot": "flow"
            },
            {
                "t": "set",
                "p": "UserInputCl",
                "pt": "msg",
                "to": "UserInputCl",
                "tot": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 468,
        "y": 496,
        "wires": [
            [
                "0ded7664e38d4c45",
                "cd1d0d31ac6446e8"
            ]
        ]
    },
    {
        "id": "46b4474ec3fa7473",
        "type": "ui_dropdown",
        "z": "7c13b8452619581b",
        "name": "TIPOLOGIA",
        "label": "TIPOLOGIA",
        "tooltip": "",
        "place": "Select option",
        "group": "2733e4a59af46689",
        "order": 1,
        "width": "9",
        "height": "1",
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "Attrezzatura",
                "value": "Attrezzatura",
                "type": "str"
            },
            {
                "label": "Strumentazione",
                "value": "Strumentazione",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "payload",
        "topicType": "msg",
        "className": "",
        "x": 342,
        "y": 272,
        "wires": [
            [
                "46669bdc7ad95e55"
            ]
        ]
    },
    {
        "id": "a6b5e5dadea9aa3b",
        "type": "change",
        "z": "7c13b8452619581b",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "TextInput",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 538,
        "y": 336,
        "wires": [
            []
        ]
    },
    {
        "id": "fcfa9bd412d25121",
        "type": "ui_text_input",
        "z": "7c13b8452619581b",
        "name": "",
        "label": "User Input",
        "tooltip": "",
        "group": "2733e4a59af46689",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "mode": "text",
        "delay": "50",
        "topic": "",
        "sendOnBlur": false,
        "className": "",
        "topicType": "str",
        "x": 338,
        "y": 336,
        "wires": [
            [
                "a6b5e5dadea9aa3b"
            ]
        ]
    },
    {
        "id": "bffd5199f28bef9f",
        "type": "ui_dropdown",
        "z": "7c13b8452619581b",
        "name": "CLASSIFICAZIONE",
        "label": "CLASSIFICAZIONE",
        "tooltip": "",
        "place": "Select option",
        "group": "2733e4a59af46689",
        "order": 3,
        "width": "9",
        "height": "1",
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "Primario",
                "value": "Primario",
                "type": "str"
            },
            {
                "label": "Secondario",
                "value": "Secondario",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "",
        "topicType": "str",
        "className": "",
        "x": 364,
        "y": 400,
        "wires": [
            [
                "ad8dfbbda055fbc4"
            ]
        ]
    },
    {
        "id": "ad8dfbbda055fbc4",
        "type": "change",
        "z": "7c13b8452619581b",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "UserInputCl",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 604,
        "y": 400,
        "wires": [
            []
        ]
    },
    {
        "id": "46669bdc7ad95e55",
        "type": "change",
        "z": "7c13b8452619581b",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "UserInputTip",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 548,
        "y": 272,
        "wires": [
            []
        ]
    },
    {
        "id": "441e35421e46de9c",
        "type": "debug",
        "z": "7c13b8452619581b",
        "name": "-->> To MSSQL PLUS  -->>",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "true",
        "targetType": "full",
        "statusVal": "UserInputTip & \"/\" & UserInputCl & \"/\" & TextInput",
        "statusType": "jsonata",
        "x": 768,
        "y": 736,
        "wires": []
    },
    {
        "id": "0ded7664e38d4c45",
        "type": "switch",
        "z": "7c13b8452619581b",
        "name": "UserInputCl empty \\n UserInputCl OK",
        "property": "UserInputCl",
        "propertyType": "msg",
        "rules": [
            {
                "t": "null"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 694,
        "y": 496,
        "wires": [
            [
                "ca1b95d22899ed5f"
            ],
            [
                "9ec0bad87e7e3ed6"
            ]
        ]
    },
    {
        "id": "89f0d8bb4916ea84",
        "type": "ui_toast",
        "z": "7c13b8452619581b",
        "position": "top right",
        "displayTime": "3",
        "highlight": "red",
        "sendall": true,
        "outputs": 0,
        "ok": "OK",
        "cancel": "",
        "raw": false,
        "className": "",
        "topic": "Error",
        "name": "",
        "x": 1120,
        "y": 480,
        "wires": []
    },
    {
        "id": "ca1b95d22899ed5f",
        "type": "change",
        "z": "7c13b8452619581b",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Classification is empty",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 912,
        "y": 480,
        "wires": [
            [
                "89f0d8bb4916ea84"
            ]
        ]
    },
    {
        "id": "9ec0bad87e7e3ed6",
        "type": "switch",
        "z": "7c13b8452619581b",
        "name": "TextInput empty \\n TextInput OK",
        "property": "TextInput",
        "propertyType": "msg",
        "rules": [
            {
                "t": "null"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 684,
        "y": 576,
        "wires": [
            [
                "ee4477c3a660cfb6"
            ],
            [
                "29dd2bc068cbb1f8"
            ]
        ]
    },
    {
        "id": "ee4477c3a660cfb6",
        "type": "change",
        "z": "7c13b8452619581b",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "User Input is empty",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 912,
        "y": 560,
        "wires": [
            [
                "89f0d8bb4916ea84"
            ]
        ]
    },
    {
        "id": "29dd2bc068cbb1f8",
        "type": "switch",
        "z": "7c13b8452619581b",
        "name": "UserInputTip empty \\n UserInputTip OK",
        "property": "UserInputTip",
        "propertyType": "msg",
        "rules": [
            {
                "t": "null"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 698,
        "y": 656,
        "wires": [
            [
                "62d7e078e0fdd545"
            ],
            [
                "441e35421e46de9c"
            ]
        ]
    },
    {
        "id": "62d7e078e0fdd545",
        "type": "change",
        "z": "7c13b8452619581b",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Tip is empty",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 916,
        "y": 640,
        "wires": [
            [
                "89f0d8bb4916ea84"
            ]
        ]
    },
    {
        "id": "cd1d0d31ac6446e8",
        "type": "debug",
        "z": "7c13b8452619581b",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 438,
        "y": 576,
        "wires": []
    },
    {
        "id": "2733e4a59af46689",
        "type": "ui_group",
        "name": "Inserimento Nuovo Strumento",
        "tab": "fa803f07a50afa29",
        "order": 1,
        "disp": true,
        "width": "9",
        "collapse": false,
        "className": ""
    },
    {
        "id": "fa803f07a50afa29",
        "type": "ui_tab",
        "name": "Inserimento Attrezzature-Strumentazione",
        "icon": "dns",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]

Thank a lot Steve.

Could you suggest me some post or link where I can see how to make a comparison between an input text and the result of a query made to an SQL table?
The result of the query is a column extracted from an SQL Table in which each raw corrispond to a string to which my input text needs to be compared. If the new inserted text input (CODIFICA) is equal to one of the already existing I need to give a message and ask to choose another input text.

See example:

QUERY RESULT VALID INPUT TEXT NOT VALID INPUT TEXT
AAA FFF CCC
BBB
CCC
BGA1
BGA2

When a NOT valid input text is inserted, an alert message must be displayed.

In the above flow there is the check if the input text is empty, I need to add the described other check.

Thank a lot

Is your previous question resolved?

This looks like a new question.

Yes it is.

It is linked to the same flow but different topic
Should I open another post?

Please, yes. Mark this thread as solved & if necessary, link back to it for reference.

I would also recommend you set a reasonable title like "How to check user input text is not in already in SQL results" - that should attract the right users to help you out.

Hello Steve,

regarding this post, I have the following problem.
In my flow, there is a notification in case of empty input.

This works only if I try to fill and then cancel the input, but if I leave blanks the fields as they appear the first time, no notification is shown and null data are saved in the SQL table.

What can be the problem?

Many thanks

No idea. Add debug nodes to every node (best off giving them useful names too) & see what happens as you try these steps - you should be able to identify where it goes wrong. If not, you will at least have more info to share on the forum for others to help you with.

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