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

Assistance with Azure DevOps UserStories and variables and filters

First off, shout out to ShaneCows and RezaDorrani for their immensely helpful YouTube vids (I'm at least 50-100 of your overall views...)

I'm having difficulty with (and maybe it's not possible) creating an app that performs V2 query against AzureDevOps, brings in the data and populates a gallery. I'd like to filter that gallery based on a drop down.

 

So, my question has a few components:
1) is it possible to store the query results in a variable? Currently, my query is this:
AzureDevOps.GetQueryResultsV2("xxxx",queryID,organization).value
I have tried to create a global variable with Set() surrounding the query command. No love.

2) because I have results in the gallery, would I be able to filter those results via a drop down? Again, I attempted to use the Filter() around my AzureDevOps query, but the syntax was way off. 

 

I might be hoping for a miracle.

1 ACCEPTED SOLUTION

Accepted Solutions
victorcp
Solution Sage
Solution Sage

Hi

yes it is possible to save it in a variable, like that:

 

Set(var, AzureDevOps.GetQueryResultsV2("xxxx",queryID,organization).value)

 

but I prefer to save it as a collection like this:

 

ClearCollect(col, AzureDevOps.GetQueryResultsV2("xxxx",queryID,organization).value)

 

Do not forget to select capture schema, if it is not enabled go to settings > Upcoming features > Experimental > Dynamic schema and turn it on (you must close and open the to the changes take efect)

 

victorcp_0-1665227646701.png

 

View solution in original post

4 REPLIES 4
victorcp
Solution Sage
Solution Sage

Hi

yes it is possible to save it in a variable, like that:

 

Set(var, AzureDevOps.GetQueryResultsV2("xxxx",queryID,organization).value)

 

but I prefer to save it as a collection like this:

 

ClearCollect(col, AzureDevOps.GetQueryResultsV2("xxxx",queryID,organization).value)

 

Do not forget to select capture schema, if it is not enabled go to settings > Upcoming features > Experimental > Dynamic schema and turn it on (you must close and open the to the changes take efect)

 

victorcp_0-1665227646701.png

 

Holy schniekies! I will try this immediately. Thanks, @victorcp 
I'll let you know how it goes! In your opinion, do you think setting this as a variable would help with my filtering ?

victorcp
Solution Sage
Solution Sage

Hi,

there is no difference to filter a variable or a collection, but I prefer to use a collection when working with tables.

 

The difference between Set, Update Context and Collection (according to Microsoft):

victorcp_0-1665314047786.png

 

Hope it helps 🙂

Luckey
Frequent Visitor

@victorcp: Just attempted those and you were 200% correct. I was able to create the collection with the AzureDevOps.GetQueryResultsV2 and then I used a Search instead of filter on that collection and it's now working perfectly. 
Thank you for your invaluable help. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,584)