cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Cannot refer to a property of a Component

I'm trying to use some data from a component to introduce on a Form in my app.

I just discovered that when I try to refer to the fields I want to use throughout the Form, because they are in a Component and not on a Gallery I cannot access the data.

 

Is there anyway of overcoming this without having to replace the Component over a Gallery?

 

 

form.png

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous 

In your component design, click on the component in the left object tree list.

Then in the right properties pane, choose, New Custom Property.

Give your property a display name and name (and always nice to add description).  Select it as an Output property type.

Set the Data Type as Record and then create.

 

Once you have that, click on the Advanced tab and look down your list of Properties for the one you just created.  It will have a default sample record in it.  Remove it and replace it with GalleryName.Selected  (obviously, use your Gallery Name that you have in your component).

 

Then from your App, reference SideGallery_1.yourPropertyName and it will be the record of the Selected Item.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@Anonymous 

Have you considered adding an Output property on your component that would be the Selected Item of the Gallery in your component?

 

That should give you what you want.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Anonymous
Not applicable

That seems like a smart ideia. How to do that?

@Anonymous 

In your component design, click on the component in the left object tree list.

Then in the right properties pane, choose, New Custom Property.

Give your property a display name and name (and always nice to add description).  Select it as an Output property type.

Set the Data Type as Record and then create.

 

Once you have that, click on the Advanced tab and look down your list of Properties for the one you just created.  It will have a default sample record in it.  Remove it and replace it with GalleryName.Selected  (obviously, use your Gallery Name that you have in your component).

 

Then from your App, reference SideGallery_1.yourPropertyName and it will be the record of the Selected Item.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Anonymous
Not applicable

Many thanks for your excellent answer!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (11,945)