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

Collecting data from a collection with strange column name (Odata_x)

Hi,

 

Just to say, when I have solved this I will put together a better / more compact formula. Im just making small pieces now for troubleshooting.
So on to my problem.  This is the code that I'm trying to run:

 

 

ClearCollect(colTotal; Gallery2_1.AllItems.Total);;
ClearCollect(col50; Gallery2_1.AllItems.'50');;
ClearCollect(col100; Gallery2_1.AllItems.'100');;
Clear(TotalHoursCollection);;
Clear(TotalMinutesCollection);;
Clear('50HoursCollection');;
Clear('50MinutesCollection');;
Clear('100HoursCollection');;
Clear('100MinutesCollection');;

ForAll(
   colTotal;
   Collect(TotalHoursCollection;First(Split(Total;":")));;
   Collect(TotalMinutesCollection;Last(Split(Total;":")))
);;

ForAll(
    col50;
   Collect('50HoursCollection';Last(Split('50';":")));;
   Collect('50MinutesCollection';Last(Split('50';":")))
);;

ForAll(
    col100;
   Collect('100HoursCollection';Last(Split('100';":")));;
   Collect('100MinutesCollection';Last(Split('100';":")))
)

 

 

Everything that has to do with "colTotal" works as intended.
But the collections "col50" and "col100" is giving me a strange column name in the collection:

"col50" column name:

Power_Dude_1-1601639468401.png 

 

It's the same thing for "col100".
The data is from a SPlist.

The below part of the code is not able to collect the data from the "col50" or "col100" collections.

 

 

ForAll(
    col50;
   Collect('50HoursCollection';Last(Split('50';":")));;
   Collect('50MinutesCollection';Last(Split('50';":")))
);;

ForAll(
    col100;
   Collect('100HoursCollection';Last(Split('100';":")));;
   Collect('100MinutesCollection';Last(Split('100';":")))
)

 

 

 

50HoursCollection:

Power_Dude_3-1601639925236.png

 


Same thing for 100hoursCollection.


Has anyone encountered this problem before and know's how to solve it?
I'm not able to type in "Odata_x0035_0_x..." as Powerapps does not show it as a suggestion.

1 ACCEPTED SOLUTION

Accepted Solutions
Power_Dude
Resolver I
Resolver I

Oh... Found the problem.

I used Last function where I was supposed to use First.
Copy pasting user issue...

View solution in original post

1 REPLY 1
Power_Dude
Resolver I
Resolver I

Oh... Found the problem.

I used Last function where I was supposed to use First.
Copy pasting user issue...

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,334)