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?
Solved! Go to Solution.
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
@PowerAddict The data source is a collection. I've cleared it and collected again, but am having the same issue.
@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?
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?
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.'
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
193 | |
45 | |
45 | |
38 | |
35 |
User | Count |
---|---|
261 | |
82 | |
81 | |
70 | |
68 |