cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akleinvm
Regular Visitor

Error in using a Table Custom Property on a Custom Component

Hi Everyone,

 

Does anyone encounter errors on a custom component using a table/record custom property as input and output?

 

To explain my situation simply, I have a custom component with a table/record custom property (input) with lots of columns with different data types. But once I use the component on my main screen, the values of some columns get mixed up.

 

For example:

I created a custom component called Component1 with a input record property Record1 - (column names: Column1(text), Column2(text), Column3(text), Column4(text) and Column5(text)).

After creating, I inserted Component1 on my main screen and assigned values to the Record1 property as seen below:

{Column1: "one", Column2: "two", Column3: "three", Column4: "four", Column5: "five"}

So the problem begins when I tried to access this property on other components.
When getting the value of Component1.Record1, it returns something like this:

 

ColumnNameColumn1Column2Column3Column4Column5
Value"two""two""three""four""three"

 

Am I doing something wrong?

I will really appreciate it if someone knows the solution to this problem since I want to use custom components as much as possible to make my app clean and efficient.

Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@akleinvm 

Your problem is that you are setting the signature of the Input record in your component with a column called "ColumnName".

I am not sure of your exact definition in the input property for your component, but based on what you look like you are trying to do, your input property on the component (and I am referring to the default property value that you assign IN the component design) should be:

Table({Column1: "one", Column2: "two", Column3: "three", Column4: "four", Column5: "five"})

 

When you provide a value for that property IN the app itself, you should use that same schema, or else you will get results like you are seeing.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@akleinvm 

Your problem is that you are setting the signature of the Input record in your component with a column called "ColumnName".

I am not sure of your exact definition in the input property for your component, but based on what you look like you are trying to do, your input property on the component (and I am referring to the default property value that you assign IN the component design) should be:

Table({Column1: "one", Column2: "two", Column3: "three", Column4: "four", Column5: "five"})

 

When you provide a value for that property IN the app itself, you should use that same schema, or else you will get results like you are seeing.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,656)