Forum Discussion
query to parameter
- 5 years ago
Hi robon ,
Have you refreshed data or applied changes?
As tested here,it works fine:
For "parameter",modify it as below:
let Source = ()=> let #"New ID"=Table.FromRecords({Table.SelectColumns(#"Table","Table.SessionID "){0}}) in #"New ID" in SourceAnd you will see:
For the updated .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Hi Kelly,
when the session id is changed the other doesn't change. I'am new to this so i probably do something wrong:(
thanks
Rob
Hi robon ,
Have you refreshed data or applied changes?
As tested here,it works fine:
For "parameter",modify it as below:
let
Source = ()=> let
#"New ID"=Table.FromRecords({Table.SelectColumns(#"Table","Table.SessionID "){0}})
in
#"New ID"
in
Source
And you will see:
For the updated .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
- robon5 years agoFrequent Visitor
Thanks Kelly,
I replaced the parameter and now it is working great.
I'am really happy with this Thanks again
Rob
- robon5 years agoFrequent Visitor
Hi Kelly,
one more question How can i use it in my script. I now have a static parameter "SessionID":
let
Source = Xml.Tables(Web.Contents(""& URL_Session &"",[Content=Text.ToBinary("
<soap:Envelope xmlns:soap="&Character.FromNumber(34)&"http://schemas.xmlsoap.org/soap/envelope/"&Character.FromNumber(34)&" xmlns:xsi="&Character.FromNumber(34)&"http://www.w3.org/2001/XMLSchema-instance"&Character.FromNumber(34)&" xmlns:xsd="&Character.FromNumber(34)&"http://www.w3.org/2001/XMLSchema"&Character.FromNumber(34)&">
<soap:Header>
<Header xmlns="&Character.FromNumber(34)&"http://www.Dummy.com/"&Character.FromNumber(34)&">
<SessionID>"&SessionID&"</SessionID>
</Header>
</soap:Header>
<soap:Body>
<SelectCompany xmlns="&Character.FromNumber(34)&"http://www.Dummy.com/"&Character.FromNumber(34)&">
<company>"& number &"</company>
</SelectCompany>
</soap:Body>
</soap:Envelope>"),Headers=[#"Content-Type"="text/xml;charset=UTF-8"]])),
#"Expanded Table" = Table.ExpandTableColumn(Source, "Table", {"Name", "Table"}, {"Table.Name", "Table.Table"}),
#"Expanded Table.Table" = Table.ExpandTableColumn(#"Expanded Table", "Table.Table", {"Name", "Table"}, {"Table.Table.Name", "Table.Table.Table"}),
#"Expanded Table.Table.Table" = Table.ExpandTableColumn(#"Expanded Table.Table", "Table.Table.Table", {"SelectCompanyResult"}, {"Table.Table.Table.SelectCompanyResult"})in
#"Expanded Table.Table.Table"