I have a component for Sidebar Menu, which has a MenuItems property of type 'Table'. When assigning a Table object directly to this property, the component works fine in a Screen. But when the Table object is a global variable created at App.OnStart and is assigned to the component, the component does not work (i.e., the menu items are not displayed).
The global table object is created:
The component property is assigned in Screen.OnVisible:
The error shown is:
How do I assign the Table object to the component's Table type property?
The =
operator doesn't work for assignments in Power Fx (the language used in Power Apps). If you want to set the MenuItems property of your NavMenu component, you can select the component in the tree view, then set the MenuItems property to the variable (menu_item_table
) as shown below: