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}}}/subscr iptions/$( endpoint.s ubscriptio nId)/resou rcegroups/ $(resource GroupName) /providers /microsoft .Network/n etworkSecu rityGroups ?api-versi on=2018-02 -01",
"resultSelector": "jsonpath:$.value[?(@.loca tion ==$(location))].name",
"parameters": { "location": "$(location)" }
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}}}/subscr
"resultSelector": "jsonpath:$.value[?(@.loca
"parameters": { "location": "$(location)" }
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers 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.
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