web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can't use data from ta...
Power Apps
Unanswered

Can't use data from table inside a collection column

(0) ShareShare
ReportReport
Posted on by 25

Hello there, 

 

my goal is to filter some data inside my app using a specific column "Status" from collection "coll_Baust". "coll_Baust" is a collection made from a SharePoint list, where the column "Status" is a Choice-Column.

 

The problem is, the value of "Status" is a nested table. So I have to convert this data before to text.

 

First try:

create a collection and add a column to insert the concat-text-value of "Status"

 

 

 

ClearCollect(coll_Baust; '239_Baustellen');;
AddColumns(coll_Baust; "Stat_Baust"; ForAll(coll_Baust; Concat(coll_Baust.Status;"")));;

 

 

 

Result:

collection is made properly, no column and no values are added.

 

Second try:

The SharePointList is long, so I decide to get just a few column I will work with and add then the new column inserting the status-text.

 

 

 

ClearCollect(coll_Baust; '239_Baustellen'.Status; '239_Baustellen'.Name; '239_Baustellen'.Kode);;
AddColumns(coll_Baust; "Stat_Baust"; ForAll(coll_Baust; Concat(coll_Baust.Status;"")));;

 

 

 

Result:

Collection is made, first column ist ok (table), second and third columns are empty 😮

 

Could someone please help me to find out what I am doing wrong and how I can achieve my goal?

Thank you very much 😄

 

p.s. for some reason I have to use ; separator inside formula and ;; separator at end - maybe country-settings (europe/italy)

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @lybhy ,

    Try this

    ClearCollect(
     coll_Baust;
     AddColumns(
     '239_Baustellen';
     "Stat_Baust";
     Concat(
     Status;
     Value & ""
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • lybhy Profile Picture
    25 on at

    Hi @WarrenBelz,

    thank you very much. Unfortunately the Concat-syntax isn't working - the part "Value &" seems to be incorrect and I can't figure out how to manage this. Any suggestions?

     

    Edit: 

    I've got it working with this syntax, but I didn't get the expected result:

    ClearCollect(collBaust; AddColumns('239_Baustellen'; "Stat_Baust"; Concat('239_Baustellen';Status_x0020_Baustelle.Value & "")));;

     

    the result is a new column "Stat_Baust" that contains all table entries of "Status_x0020_Baustelle":

     

    Bildschirmfoto 2021-04-18 um 18.07.16.png

     

    but I need just one value  the table in Status_x0020_Baustelle contains just one value for each table, look at here the first table:

     

    Bildschirmfoto 2021-04-18 um 18.10.41.png

     

    Therefor I was supposed to use a ForAll function to iterate through all entries of the collBaust collection, but I can't get the right syntax.

     

     

    Thanks a lot,

    lybhy

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    HI @lybhy ,

    I have this working perfectly here on a multi-choice field (I assume that is what yours is) field and looking at your data structure, the syntax should be

    ClearCollect(
     collBaust; 
     AddColumns(
     '239_Baustellen'; 
     "Stat_Baust"; 
     Concat(
     Status_x0020_Baustelle;
     Value & ""
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @lybhy ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • lybhy Profile Picture
    25 on at

    Hi @WarrenBelz ,

    sorry for answering so late, but I had a lot of work and wasn't able to test again. Now what I got: 
    for a better try I started a new app, but I didn't get this to work. This time the "Value" isn't accepted:
    Bildschirmfoto 2021-05-02 um 11.34.09.png

    I tried without value and the "Stat_Baust" -column of the collection result is empty.

     

    So now I got stuck again 😞 

  • zaphod88 Profile Picture
    502 on at

    Try to replace the Concat() by:

    Concat(Status.Value&"")
  • lybhy Profile Picture
    25 on at

    Thank you @zaphod88, but this even doesn't work

  • zaphod88 Profile Picture
    502 on at

    I am struggling with AddColumns() and filling the new column as well sometimes. Maybe try

    ClearCollect(collBaust; AddColumns('239_Baustellen'; "Stat_Baust"; ""));;
    ForAll('239_Baustellen'; Patch(collBaust; LookUp(collBaust; ID = '239_Baustellen'[@ID]); {'Stat_Baust': Status.Value}))
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @lybhy ,

    I cannot see your data, but this may be the structure you need - this should not be difficult to solve

    ClearCollect(
     collBaust; 
     AddColumns(
     '239_Baustellen'; 
     "Stat_Baust"; 
     Concat(
     Status & ""
     )
     )
    )

    If not, what type of column are you trying to combine and what is it's name and the list name (assume '239_Baustellen'). To test, but this on a button

    ClearCollect(colTest;'239_Baustellen')

    Please use view > collections >colTest and send a screen shot of what is in the column.
    @zaphod88 , You might give me a chance to answer in my time zone (UTC +10)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @lybhy ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard