lundi 9 août 2021

Need help in power query

On a website, where I can find issues, I want to know the issuetype of an issue. Power Query should show me, through rest api,which issuetype the issue has. There are 3 issuetypes: Feature, Story, and Task If the issuetype is "story", the query is supposed to use a link which can be found on the main website to get some other information there.

Does anyone know how to do this?

Here the code: //I already loaded an issue which has the issuetype "story"

let
Source = Json.Document(Web.Contents("https://website.com")), //website
fields = Source[fields],
#"Converted to Table" = Record.ToTable(fields),
#"Filtered Rows1" = Table.SelectRows(#"Converted to Table", each ([Name] = "customfield_10009" or [Name] = "customfield_13602" or [Name] = "customfield_13702" or [Name] = "issuetype")),
Value1 = #"Filtered Rows1"{0}[Value], 
#"Converted to Table1" = Record.ToTable(Value1),
#"Filtered Rows" = Table.SelectRows(#"Converted to Table1", each ([Value] = "Story")) //output of the issuetype
in
    #"Filtered Rows"

Aucun commentaire:

Enregistrer un commentaire