cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Resolver I
Resolver I

Re: table control 'expected text value' error on new columns

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
Highlighted
Super User
Super User

Re: table control 'expected text value' error on new columns

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)
Highlighted
Resolver I
Resolver I

Re: table control 'expected text value' error on new columns

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

Highlighted
Super User
Super User

Re: table control 'expected text value' error on new columns

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)
Highlighted
Resolver I
Resolver I

Re: table control 'expected text value' error on new columns

@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?

Highlighted
Super User
Super User

Re: table control 'expected text value' error on new columns

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)
Highlighted
Community Support
Community Support

Re: table control 'expected text value' error on new columns

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.

Highlighted
Resolver I
Resolver I

Re: table control 'expected text value' error on new columns

@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?

Highlighted
Community Support
Community Support

Re: table control 'expected text value' error on new columns

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.

Highlighted
Resolver I
Resolver I

Re: table control 'expected text value' error on new columns

@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
Watch Now

Experience what’s next for Power Apps

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

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,324)