# Analytics Builder issue

**URL:** <https://community.cumulocity.com/t/analytics-builder-issue/7415>\
**Category:** Forum\
**Tags:** cumulocity-edge, thin-edge-io, cumulocity\
**Created:** [November 30, 2023, 8:27am UTC](https://community.cumulocity.com/t/analytics-builder-issue/7415 "2023-11-30T08:27:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lall.gaurav](https://avatars.discourse-cdn.com/v4/letter/l/ac8455/32.png) [@lall.gaurav](https://community.cumulocity.com/u/lall.gaurav)\
**Post date:** [November 30, 2023, 8:27am UTC](https://community.cumulocity.com/t/analytics-builder-issue/7415/1 "2023-11-30T08:27:18Z")

</div>

I want to update relayState property of a managed Object. ‘relayState’ property is inside ‘c8y\_Relay’ property. I am using Analytics builder appilication to create a model which is using ‘Managed Object Output’ block but I am only able to update ‘c8y\_Relay’ property and not ‘relayState’ property.

#### _ **Product/components** used and **version/fix** level:_

#### _Detailed explanation of the problem:_

I want to update relayState property of a managed Object. ‘relayState’ property is inside ‘c8y\_Relay’ property. I am using Analytics builder appilication to create a model which is using ‘Managed Object Output’ block but I am only able to update ‘c8y\_Relay’ property and not ‘relayState’ property.  
What should be the ‘Property Name’ inside ‘Managed Object Output’ block so that ‘relayState’ gets updated?

#### _Error messages / **full error** message screenshot / **log** file:_

Expecting to change value of “relayState” but only value of “c8y\_Relay” is changing

“c8y\_Relay”: {  
“relayState”: “OPEN”  
}

#### _Question related to a **free trial** , or to a **production (customer)** instance?_

---

<div class="post-metadata">

**Author:** ![Harald\_Meyer](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harald_meyer/32/1959_2.png) [@Harald\_Meyer](https://community.cumulocity.com/u/Harald_Meyer)\
**Post date:** [November 30, 2023, 8:50am UTC](https://community.cumulocity.com/t/analytics-builder-issue/7415/2 "2023-11-30T08:50:36Z")

</div>

You can only update top-level properties in a managed object. So you need to build the structure using the Set Properties block. If you need to retain some of the original fields, you would first need to run the Extract Properties block to retrieve the structure and then update whatever fields you want to update.

---

<div class="post-metadata">

**Author:** ![lall.gaurav](https://avatars.discourse-cdn.com/v4/letter/l/ac8455/32.png) [@lall.gaurav](https://community.cumulocity.com/u/lall.gaurav)\
**Post date:** [December 1, 2023, 7:47am UTC](https://community.cumulocity.com/t/analytics-builder-issue/7415/3 "2023-12-01T07:47:23Z")

</div>

How to set nested property in “Set Properties” block and use this block to update particular Managed Object? In my case, “relayState” property is inside “c8y\_Relay” property.

---

<div class="post-metadata">

**Author:** ![Harald\_Meyer](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harald_meyer/32/1959_2.png) [@Harald\_Meyer](https://community.cumulocity.com/u/Harald_Meyer)\
**Post date:** [December 1, 2023, 8:05am UTC](https://community.cumulocity.com/t/analytics-builder-issue/7415/4 "2023-12-01T08:05:08Z")

</div>

You can set nested properties by chaining them. In your case though as you only require one level down, the following should be sufficient:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/8/b/8b545eaaad81bac8ecf0c0405574ea9fce0e5d0e.png)

The parameter of the Constant Value block is “OPEN”, The “property 1” parameter of the Set properties block is “relayState” and the property name of the output block is “c8y\_Relay”.

---

<div class="post-metadata">

**Author:** ![lall.gaurav](https://avatars.discourse-cdn.com/v4/letter/l/ac8455/32.png) [@lall.gaurav](https://community.cumulocity.com/u/lall.gaurav)\
**Post date:** [December 1, 2023, 11:19am UTC](https://community.cumulocity.com/t/analytics-builder-issue/7415/5 "2023-12-01T11:19:13Z")

</div>

Thank you @Harald_Meyer , issue resolved. You made my day.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [May 29, 2024, 11:19am UTC](https://community.cumulocity.com/t/analytics-builder-issue/7415/6 "2024-05-29T11:19:15Z")

</div>

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