cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seadude
Level 10

COMPONENTS: Foggy on Custom Property OUTPUTS

Hello,

I feel like I'm getting a decent grasp on:
- Using variables within a component

- Passing variables from app to a component

But I'm unable to feed variables from a component to the app.

Example:

- I have a simple screen component with a menu and subheader

- When a menu item is pressed, the subheader is updated with the menu item name

- I now need to show/hide app elements based on which menu item is pressed

  - Example: App elements with Visible properties set to If(component.cmpSubheading = "Introduction", true, false)

- I created a custom text output property called cmpSubheading

- But I can't figure out:

    1. How to set the subheading to cmpSubheading property within the component

    2. How to access component.cmpSubheading once the component has been added to the app.

        a. It is not present in the components property list

Hope this is clear

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: COMPONENTS: Foggy on Custom Property OUTPUTS

Hi @seadude ,

Could you please share a bit more about your scenario?

Do you want to reference the custom Output property of your Component from your app?

Further, could you please share a bit more about the subheader that you mentioned? Is it a Label control? Could you please share a screenshot about your Component?

 

I have made a test on my side, please take a try with the following workaround:

For your first question, when you defined a Output property within your Component, then you need to click "Advanced" option within your right panel, then you could see your custom Output property (cmpSubheading) display there:8.JPG

Within the cmpSubheading (Output) box, you need to bind it to your subheader control. I assume that your subheader control is a Label control, then you need to type the following formula within the cmpSubheading (Output) box:

Subheader.Text

 

For your second question, if you have added above Component into your app already, you could use the following formula to reference the cmpSubheading property of the Component:

Component1_1.cmpSubheading

9.JPG

Please check the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 REPLIES 6
Community Support Team
Community Support Team

Re: COMPONENTS: Foggy on Custom Property OUTPUTS

Hi @seadude ,

Could you please share a bit more about your scenario?

Do you want to reference the custom Output property of your Component from your app?

Further, could you please share a bit more about the subheader that you mentioned? Is it a Label control? Could you please share a screenshot about your Component?

 

I have made a test on my side, please take a try with the following workaround:

For your first question, when you defined a Output property within your Component, then you need to click "Advanced" option within your right panel, then you could see your custom Output property (cmpSubheading) display there:8.JPG

Within the cmpSubheading (Output) box, you need to bind it to your subheader control. I assume that your subheader control is a Label control, then you need to type the following formula within the cmpSubheading (Output) box:

Subheader.Text

 

For your second question, if you have added above Component into your app already, you could use the following formula to reference the cmpSubheading property of the Component:

Component1_1.cmpSubheading

9.JPG

Please check the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: COMPONENTS: Foggy on Custom Property OUTPUTS

@seadude, can you let us know if you were able to set up the output with @v-xida-msft's instructions?

Highlighted
seadude
Level 10

Re: COMPONENTS: Foggy on Custom Property OUTPUTS

Hi @v-xida-msft and @Mr-Dang-MSFT !

 

I was able to use @v-xida-msft 's method of binding the Subheading.Text Property to the Custom Output Property / Advanced field. I'm going to go out on a limb and say, this is not intuitive from an experienced App Maker perspective.

I'd prefer to keep track of which Custom Properties are Input and Output then have ALL of the them available in the Component Property dropdown. I have never used the "Advanced" (nor really the right "Properties" pane at all) when building apps.
I always use the Properties Dropdown for a Control.

Thank you for the valuable insights. Now I can rock once again!

seadude
Level 10

Re: COMPONENTS: Foggy on Custom Property OUTPUTS

PS: Kris, the animated .gif really helped me understand the solution!

seadude
Level 10

Re: COMPONENTS: Foggy on Custom Property OUTPUTS

PPS: If its helpful for enhancement purposes, here is an example of where I was hung up...

- I'm used to all Properties of a Control being available in the top left dropdown...

Screenshot from 2019-05-24 19-46-23.png

- To have to define an Output property THEN intantiate it in the Advanced pane, THEN have to call it out by dot notation BUT, not have it visible in the Properties Dropdown where EVERY other property is visible... is the non-intuitive part...

Screenshot from 2019-05-24 19-48-45.png

 

"subHeading" is the Custom Output Property.

 

seadude
Level 10

Re: COMPONENTS: Foggy on Custom Property OUTPUTS

Hi @v-xida-msft ,

Quick question: How do I access the OnSelect of a Component (or Gallery within a component)?

Example:

* Menu Gallery within a Component

* When user clicks Menu item, I want to Navigate them to different screens

* I've created a Custom Output Property, but can't figure out how to access it when user clicks the Component from the app.

Any ideas?

 

**EDIT** Disregard. Here is an example of how to use a Gallery menu within a Component to Navigate:

https://powerusers.microsoft.com/t5/Components-Gallery/Header-amp-Menu-Component/td-p/328654

Thank you

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 373 members 5,541 guests
Please welcome our newest community members: