# Widget Variable Not Being Set

**URL:** <https://forums.unrealengine.com/t/widget-variable-not-being-set/1289442>\
**Category:** UI\
**Tags:** unreal-engine, Widget, question\
**Created:** [September 9, 2023, 9:12pm UTC](https://forums.unrealengine.com/t/widget-variable-not-being-set/1289442 "2023-09-09T21:12:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blindminds](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blindminds/32/1213160_2.png) [@blindminds](https://forums.unrealengine.com/u/blindminds)\
**Post date:** [September 9, 2023, 9:12pm UTC](https://forums.unrealengine.com/t/widget-variable-not-being-set/1289442/1 "2023-09-09T21:12:40Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/0/ad02445531bdbd608f28047e07c33f3056a770f3.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/3/1f3fbefe9af11d97017bfdc49331b2103546e091.png)  
Screenshots of the Main Widget…  
Deception and Stealth are the ProfSkills Widget, the Conditions text is the Conditions Widget.  
The Main Widget Passes the Variables to the corresponding widgets; and the corresponding widgets use the text array to add child widgets and populate the list.  
The ProfSkills Widget is working perfectly. The Conditions Widget is setup in te same manner, but for some reason the variable is not being set?  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/e/4ce7c7e232a853de70c8dab35abf400cdbd85f6e.png)  
The green “14” is the length of the array after being set on the widget.  
The yellow 2 is the length of the ProfSkills Array, printed after being set by parent widget  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/9/299bed7e583729c28838e35eddc95fc342861896.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/b/69b6d8be0ad86cf3d9d971ca795495643c8e52e2.png)

The Pink “0” is the length o the Conditions Array printed at Event Construct, same as ProfSkills Widget.

For the life of me I canot figure out why the Conditions Widget returns a 0 length array, and will not populate the list.

There is 14 items in the Conditions array.

---

<div class="post-metadata">

**Author:** ![blindminds](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blindminds/32/1213160_2.png) [@blindminds](https://forums.unrealengine.com/u/blindminds)\
**Post date:** [September 10, 2023, 4:14pm UTC](https://forums.unrealengine.com/t/widget-variable-not-being-set/1289442/2 "2023-09-10T16:14:55Z")

</div>

Found Solution:  
Instead of having variables inside the child widgets and setting those variables from parent widget I:

Created a Custom Event in Child Widget with Inputs for the Variables, the Custom Event is called from Parent Widget and passes the Variables to the Custom Event.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 10, 2023, 4:15pm UTC](https://forums.unrealengine.com/t/widget-variable-not-being-set/1289442/3 "2023-10-10T16:15:18Z")

</div>

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