cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Retrieving data from GetTask_Response_V2 into a table in PowerApps

I've created a simple PowerApp with two date pickers and a table. When I update the date pickers, the table shows tasks which were completed in between the StartDate and EndDate. I populate the table with this code in PowerApps.

 

Filter(Planner.ListMyTasksV2().value,completedDateTime>DateStart,completedDateTime<DateEnd)

 

This works beautifully,

 

Now I want to make all the data retrieved into the table human-readable. A couple of the data elements retrieved in GetTask_Response_V2 are not text values. For example, "_assignments". In the table, the _assignments field shows "[object Object]".

 

According to https://docs.microsoft.com/en-us/connectors/planner/#gettask_response_v2, I should be able to open up the _assignments field to show _assignments.userId, but that fails. So do multiple variants on combinations of quotes, square braces, and curly braces around "userId".

 

Here is one n00b question:

1) How do I reference the elements within assignments?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Retrieving data from GetTask_Response_V2 into a table in PowerApps

Hi @courcrawford ,

Do you want to display the userId value under the _assignments property returned from the Planner.ListMyTasksV2().value function within your Data Table?

 

Based on the issue that you mentioned, I have made a test on my side. Actually, the _assignments property value returned from the Planner.ListMyTasksV2().value function is a object array. If you want to reference the userId value under the _assignments object array directly within Data Table, I afraid that there is no way to achieve your needs.

 

As an alternative solution, you could consider customize the formula within the Text property of the  _assignments column in your Data Table:

3.JPG

 

4.JPG

Set the Items property of the Data Table to following:

Filter(Planner.ListMyTasksV2().value, completedDateTime > StartDatePicker.SelectedDate, completedDateTime<EndDatePicker.SelectedDate)

enable the  _assignments field within your Data Table, then set the Text property of the _assignments column in Data Table to following:

Concat(ThisItem._assignments, userId & ";")

then all userId values under the  _assignmentsproperty would be concatenated with a single string value, and displayed within the _assignments column in Data Table.

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Retrieving data from GetTask_Response_V2 into a table in PowerApps

As far as I am aware, a datatable control cannot display fields that contain records.

However, you could display it in a gallery which also contains a subgallery. You can even arrange the gallery into something that looks like a table, as I have done here. (Though there is no subgallery in this case)


Highlighted
Community Support
Community Support

Re: Retrieving data from GetTask_Response_V2 into a table in PowerApps

Hi @courcrawford ,

Do you want to display the userId value under the _assignments property returned from the Planner.ListMyTasksV2().value function within your Data Table?

 

Based on the issue that you mentioned, I have made a test on my side. Actually, the _assignments property value returned from the Planner.ListMyTasksV2().value function is a object array. If you want to reference the userId value under the _assignments object array directly within Data Table, I afraid that there is no way to achieve your needs.

 

As an alternative solution, you could consider customize the formula within the Text property of the  _assignments column in your Data Table:

3.JPG

 

4.JPG

Set the Items property of the Data Table to following:

Filter(Planner.ListMyTasksV2().value, completedDateTime > StartDatePicker.SelectedDate, completedDateTime<EndDatePicker.SelectedDate)

enable the  _assignments field within your Data Table, then set the Text property of the _assignments column in Data Table to following:

Concat(ThisItem._assignments, userId & ";")

then all userId values under the  _assignmentsproperty would be concatenated with a single string value, and displayed within the _assignments column in Data Table.

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,990)