# Setting Dynamic Data in N.R. for uibuilder jQuery F.E.?

**URL:** <https://discourse.nodered.org/t/setting-dynamic-data-in-n-r-for-uibuilder-jquery-f-e/24304>\
**Category:** Dashboard\
**Created:** [6 April 2020 05:11 UTC](https://discourse.nodered.org/t/setting-dynamic-data-in-n-r-for-uibuilder-jquery-f-e/24304 "2020-04-06T05:11:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digital-Thor](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@Digital-Thor](https://discourse.nodered.org/u/Digital-Thor)\
**Post date:** [6 April 2020 05:11 UTC](https://discourse.nodered.org/t/setting-dynamic-data-in-n-r-for-uibuilder-jquery-f-e/24304/1 "2020-04-06T05:11:59Z")

</div>

I'm making progress with the basics of uibuilder, but not quite following how to catch changes in "dynamic" data. Let's say I want to catch a value change in the client side **jQuery** app using the uibuilder pattern:

```auto
  uibuilder.onChange( 'myState', function(newVal) {
      console.info( 'myState changed!' )
      console.log( 'myState:' , newVal )
      ... some cool code ...
  })

```

Is it possible to set the value in a _node-red_ function using something like `uibuilder.set('myState','unconfused')` so the the onChange callback above spots changes? Or is that not how dynamic values work? Can I only use the getter and setters within the jQuery side code? So in that case, I would use a Node Red function to set the `{key:value}` inside the `msg.payload` and then use `uibuilder.onChange('msg',callbackFn)` just to get the _payload_ (which means I have to store the previous `key:values` in jQuery code to look for changes)?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [6 April 2020 14:32 UTC](https://discourse.nodered.org/t/setting-dynamic-data-in-n-r-for-uibuilder-jquery-f-e/24304/2 "2020-04-06T14:32:08Z")

</div>

You will have to feed data into the uibuilder node. It remains a node-red-node, meaning, passing messages.

---

<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:** [6 May 2020 14:32 UTC](https://discourse.nodered.org/t/setting-dynamic-data-in-n-r-for-uibuilder-jquery-f-e/24304/3 "2020-05-06T14:32:09Z")

</div>

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