# Numeric Input won't "latch/save" for following inputs

**URL:** <https://discourse.nodered.org/t/numeric-input-wont-latch-save-for-following-inputs/71140>\
**Category:** Dashboard\
**Created:** [23 November 2022 20:20 UTC](https://discourse.nodered.org/t/numeric-input-wont-latch-save-for-following-inputs/71140 "2022-11-23T20:20:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbmgf7](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rbmgf7](https://discourse.nodered.org/u/rbmgf7)\
**Post date:** [23 November 2022 20:20 UTC](https://discourse.nodered.org/t/numeric-input-wont-latch-save-for-following-inputs/71140/1 "2022-11-23T20:20:16Z")

</div>

I'm using this dashboard function along with Forms to marry 3 sets of data. I have the numeric input (Dips) set to only select 1, 2, or 3. Then the Scan Info (dashboard: forms) is just collecting data from 2 QR codes. For the first attempt, I'll select the numeric info first then scan the two QR codes and I'll get the results I want. For following inputs, all I'm supposed to do is scan the 2 QR codes and it should still marry whatever I selected for the numeric input but it's not. It's undefined. I have to go to the up/down selector to have the value reset and then it'll work again. I prefer to not have to do that. Is there a way to hold the numeric value for subsequent inputs without having to mess with it? Thanks.

 ![mr_screenshot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/3/2356b4b5e871aec02c75c007008187f4ed8dac2b.png)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 November 2022 21:59 UTC](https://discourse.nodered.org/t/numeric-input-wont-latch-save-for-following-inputs/71140/2 "2022-11-23T21:59:25Z")

</div>

Hi,

You may need to post the actual code for the nodes you posted above.

At the very least the code from the `function` node.

---

<div class="post-metadata">

**Author:** ![rbmgf7](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rbmgf7](https://discourse.nodered.org/u/rbmgf7)\
**Post date:** [28 November 2022 16:06 UTC](https://discourse.nodered.org/t/numeric-input-wont-latch-save-for-following-inputs/71140/3 "2022-11-28T16:06:10Z")

</div>

```auto
[
    {
        "id": "9b04fbf83e08a815",
        "type": "tab",
        "label": "Monorail Load Station 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "a7cdac1e00d3c86d",
        "type": "ui_numeric",
        "z": "9b04fbf83e08a815",
        "name": "",
        "label": "Dips",
        "tooltip": "",
        "group": "dc723265ea170c82",
        "order": 2,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": false,
        "topic": "dips",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "1",
        "max": "3",
        "step": 1,
        "className": "",
        "x": 370,
        "y": 160,
        "wires": [
            [
                "a4f254990a7da987"
            ]
        ]
    },
    {
        "id": "7e01b4883c297b48",
        "type": "ui_form",
        "z": "9b04fbf83e08a815",
        "name": "",
        "label": "Scan Information",
        "group": "dc723265ea170c82",
        "order": 3,
        "width": 0,
        "height": 0,
        "options": [
            {
                "label": "QAS Barcode",
                "value": "qas_bc",
                "type": "text",
                "required": true,
                "rows": null
            },
            {
                "label": "Hanger Barcode",
                "value": "hanger_bc",
                "type": "number",
                "required": true,
                "rows": null
            }
        ],
        "formValue": {
            "qas_bc": "",
            "hanger_bc": ""
        },
        "payload": "",
        "submit": "Submit",
        "cancel": "Clear",
        "topic": "topic",
        "topicType": "msg",
        "splitLayout": false,
        "className": "",
        "x": 410,
        "y": 120,
        "wires": [
            [
                "094cf976c9f8f5f9"
            ]
        ]
    },
    {
        "id": "bee9f2b03aa8e640",
        "type": "debug",
        "z": "9b04fbf83e08a815",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1020,
        "y": 120,
        "wires": []
    },
    {
        "id": "125e5cb3f96a19da",
        "type": "function",
        "z": "9b04fbf83e08a815",
        "name": "function 1",
        "func": "msg.payload = {\n\n \"qas_barcode\": msg.payload.qas_bc,\n \"hanger_barcode\": msg.payload.hanger_bc,\n \"dips\": msg.payload.dips\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 880,
        "y": 120,
        "wires": [
            [
                "bee9f2b03aa8e640"
            ]
        ]
    },
    {
        "id": "a4f254990a7da987",
        "type": "change",
        "z": "9b04fbf83e08a815",
        "name": "",
        "rules": [
            {
                "t": "move",
                "p": "payload",
                "pt": "msg",
                "to": "payload.dips",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 160,
        "wires": [
            [
                "094cf976c9f8f5f9"
            ]
        ]
    },
    {
        "id": "094cf976c9f8f5f9",
        "type": "join",
        "z": "9b04fbf83e08a815",
        "name": "",
        "mode": "custom",
        "build": "merged",
        "property": "payload",
        "propertyType": "msg",
        "key": "payload.dips",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "num",
        "reduceFixup": "",
        "x": 730,
        "y": 120,
        "wires": [
            [
                "125e5cb3f96a19da"
            ]
        ]
    },
    {
        "id": "dc723265ea170c82",
        "type": "ui_group",
        "name": "Monorail Load",
        "tab": "1a2913bf1bb8cd21",
        "order": 1,
        "disp": true,
        "width": "10",
        "collapse": false,
        "className": ""
    },
    {
        "id": "1a2913bf1bb8cd21",
        "type": "ui_tab",
        "name": "Monorail Load Station 1",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 November 2022 19:17 UTC](https://discourse.nodered.org/t/numeric-input-wont-latch-save-for-following-inputs/71140/4 "2022-11-28T19:17:48Z")

</div>

Thanks, but I may need to know a bit more on how to use the code.

I don't have a barcode scanner.

Oh, ok. I did see a couple of messages with `undefined` in them, but can't now get them to happen again.

So I can't say much more on what the problem is.

I do want to help, but I seem to be stuck.

---

<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:** [28 December 2022 19:17 UTC](https://discourse.nodered.org/t/numeric-input-wont-latch-save-for-following-inputs/71140/5 "2022-12-28T19:17:55Z")

</div>

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