0

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:

enter image description here

The component property is assigned in Screen.OnVisible:

enter image description here

The error shown is:

enter image description here

How do I assign the Table object to the component's Table type property?

1 Answer 1

1

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:

Setting property

Sign up to request clarification or add additional context in comments.

1 Comment

ok. I forgot to mention. I already tried it and can see the menu is blank (no items shown) when the application is run, when assigning the property as mentioned above. I tried this again and it was the same issue. But after using the 'Run OnStart' before running the application, the menu is visible now. thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.