# Get the id value (from db) and add it to the output of a ui-form?

**URL:** <https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992>\
**Category:** Dashboard\
**Tags:** ui-widgets, dashboard-2\
**Created:** [8 November 2024 14:42 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992 "2024-11-08T14:42:34Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [8 November 2024 21:02 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992/21 "2024-11-08T21:02:06Z")

</div>

Might be a idea to add a hidden form type element, maybe worth a feature request.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 November 2024 21:18 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992/22 "2024-11-08T21:18:57Z")

</div>

> [@E1cid](#):
>
> Might be a idea to add a hidden form type element

Perhaps. But I feel that too is a workaround for the lack of support for permitting extra/meta data to be included with the submission The better solution might be to send back the original payload but with the updated field rather than building a new payload from the fields. Or, at least permit a `key` to be included. There was a similar recent post around table rows not including meta info like the row `number` or identifiable meta data.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [8 November 2024 21:30 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992/23 "2024-11-08T21:30:54Z")

</div>

> [@Steve-Mcl](#):
>
> But I feel that too is a workaround for the lack of support for permitting extra/meta data to be included with the submission The better solution might be to send back the original payload but with the updated field rather than building a new payload from the fields. Or, at least permit a `key` to be included

Maybe, but people with less skill in coding and beginners, may find it more intuitive to add a hidden field, this may be more visual in the flow for them. I agree that the payload should pass all added keys not in form to.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 November 2024 21:33 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992/24 "2024-11-08T21:33:42Z")

</div>

Fair comment.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 November 2024 21:40 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992/25 "2024-11-08T21:40:12Z")

</div>

What is wrong with the much simpler method of using msg.topic?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 November 2024 09:14 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992/26 "2024-11-09T09:14:52Z")

</div>

> [@Colin](#):
>
> What is wrong with the much simpler method

What is wrong with it is that it doesn't work as it should. I have submitted an issue. [Form node does not pass on topic when configured to do so · Issue #1453 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1453)

---

<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:** [23 November 2024 09:15 UTC](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992/27 "2024-11-23T09:15:06Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/get-the-id-value-from-db-and-add-it-to-the-output-of-a-ui-form/92992.md?page=1)
