Link to home
Start Free TrialLog in
Avatar of Mal Gaskell
Mal Gaskell

asked on

variable usage in vsts dataSourceBindings

Hi,

I'm just starting out writing a custom extension for VSTS; within task.json i have an input picklist ($location) thats bound to a datasource which retrieves a list of locations. I want to then use the selected location to filter the results for another input picklist. But the endpoint url does not contain the location and trying to filter the json result using $location in resultSelector does not return any results. (i have replaced $location in resultSelector with text to confirm the datasource is ok). Here's the code im using, any suggestions on where im going wrong please?:

"target": "networkSG",
"endpointId": "$(ConnectedServiceName)",
"endpointUrl": "{{{endpoint.url}}}/subscriptions/$(endpoint.subscriptionId)/resourcegroups/$(resourceGroupName)/providers/microsoft.Network/networkSecurityGroups?api-version=2018-02-01",
 "resultSelector": "jsonpath:$.value[?(@.location ==$(location))].name",
 "parameters": { "location": "$(location)" }
Avatar of Kyle Santos
Kyle Santos
Flag of United States of America image

Hi,

I am here to help you with your open question.  Do you still need help?  I have the ability to alert more experts if you still need help.

If you solved the problem on your own, would you please post the solution here in case others have the same problem?

If you need me to delete this question just say "Delete."

Thank you for using Experts Exchange.

Regards,

Kyle Santos
Customer Relations
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.