cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver I
Resolver I

table control 'expected text value' error on new columns

I have a form control which I have just added columns to from the data source. All the existing columns are fine, but the new ones are showing [object Object], and the text function is showing the 'expected text value' error. Previously added columns show correctly, regardless of the data type.

In the image below, the withdrawal reason was an existing column, and Age was added today. Any ideas on why this is happening?

 

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions

So, I thought I'd take out the whole formula and add it one item at a time (again), to try and identify where the error is, and this time it was accepted without any errors. As the collection was looking good, I reloaded the data table (which was still showing [object Object] where the original data source column was an option set), and that is looking fine too.

Thanks for the assistance, @PowerAddict @v-siky-msft  

View solution in original post

17 REPLIES 17
Super User II
Super User II

Hi,

Can you please tell me what your datasource is? Also can you try removing and adding your data source back?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

@PowerAddict The data source is a collection. I've cleared it and collected again, but am having the same issue.

Can you share the format of column in your collection? Also can you share the datacard properties of the controls within the form that are facing this error?

If you would like, you could share the via a private message.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

@PowerAddict It's a table control that I'm having this issue with, not a form. How do I find the column format for the collection? Are they the same as the original data source that it is collecting from?

Yes. The columns should be the sam, so yes the format of the datasource columns should be good. And yea, I would like to see how you are collecting from the data source.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)
Community Support
Community Support

Hi  @Caroline ,

 

It seems that the Age column is a nested table in your collection. The table control only support to show text.

You can check it in the File - Collections, the value of Age column would show like a grid as shown below.

I guess you added a table in Age column, can you share the formula you use to add Age column?

Snipaste_2019-11-14_17-02-25.png 

Best regards,

Sik

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

@v-siky-msft @PowerAddict You're right, the columns that are not showing correctly are displaying a grid in the Collections tab. I've also just realised that all the columns in error were added to the collection from a different data source, which has presumably nested them. ( I thought the improved table control setting meant that the table could handle them)

I'm using two Collect() fomulas, one is based on the gallery.selected, the other filters another data source by the primary name of the gallery.selected. The latter are the ones that have been nested. 

A shortened version of the Collect() that I'm using is:

 

OnCheck=Collect(Reports,{'First name':BrowseLearnerGallery_2.Selected.'First name',Surname:BrowseLearnerGallery_2.Selected.Surname});Collect(Reports,{'Phone number':(Filter(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN)).'Cell phone number','Email address':(Filter(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN)).'Email address'})

 

I've tried using AddColumns() instead of the second Collect(), but I think I must be missing something, as it didn't add columns to the collection.

Is there another way around this?

Hi @Caroline ,

 

OnCheck=Collect(Reports,{'First name':BrowseLearnerGallery_2.Selected.'First name',Surname:BrowseLearnerGallery_2.Selected.Surname});Collect(Reports,{'Phone number':(Filter(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN)).'Cell phone number','Email address':(Filter(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN)).'Email address'})


Two filter expression above will return a single-column table, this is why the column is nested in the collection.

You can try to use First(Filter(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN)).'Cell phone number' OR LookUp(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN).'Cell phone number'.

These two formula will return a text/number, please take a try and check if your issue is fixed.

 

OnCheck=Collect(Reports,{'First name':BrowseLearnerGallery_2.Selected.'First name',Surname:BrowseLearnerGallery_2.Selected.Surname});Collect(Reports,{'Phone number':First(Filter(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN)).'Cell phone number','Email address':First(Filter(Learner_Details,SWN=BrowseLearnerGallery_2.Selected.SWN)).'Email address'})

 

By the way, the AddColumns returns a table, not modify the table, you have to use it together with ClearCollect() function.

 

ClearCollect(col2, AddColumns(col1,"ColumnName","Value"))

 

Best regards,

Sik

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

@v-siky-msft @PowerAddict Thanks. I tried both First and LookUp, and both return 'Incompatible type. The item you're trying to put into a collection has a type that's not compatible with the collection.'

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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