<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PowerQuery for Slack in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/PowerQuery-for-Slack/m-p/2911242#M27591</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For the life of me, I can't figure out why this doesn't work. I'm trying to get a list of all users of a Workspace, with pagination. I can't seem to get the if statement to work to build the URL to deal with paging. Maybe my approach is wrong, I don't know.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;vUrl = "&lt;A href="https://slack.com/api/admin.users.list?team_id=12&amp;amp;limit=2" target="_blank" rel="noopener"&gt;https://slack.com/api/admin.users.list?team_id=12&amp;amp;limit=2&lt;/A&gt;",&lt;BR /&gt;vHeaders =[&lt;BR /&gt;#"Method"="POST",&lt;/P&gt;&lt;P&gt;#"Authorization"="Bearer " &amp;amp; SlackToken&lt;BR /&gt;],&lt;BR /&gt;theCursor = "",&lt;BR /&gt;GetData =() as table =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;url = if theCursor = "" then vUrl else vUrl &amp;amp; "&amp;amp;cursor=" &amp;amp; theCursor,&lt;BR /&gt;Source = Json.Document(Web.Contents(url , [Headers=vHeaders])),&lt;BR /&gt;tab = Table.Combine({Table.FromList(Source[users], Splitter.SplitByNothing(), null, null, ExtraValues.Error)}),&lt;BR /&gt;theCursor = source[response_metadata][next_cursor]&lt;BR /&gt;in tab,&lt;BR /&gt;Custom1 = List.Generate( () =&amp;gt; [LastCount=2,res=GetData()],each [LastCount]&amp;lt;=3,each [LastCount=Table.RowCount([res])+1,res=GetData()],each [res]),&lt;BR /&gt;#"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),&lt;BR /&gt;#"Expanded Column1" = Table.ExpandTableColumn(#"Converted to Table", "Column1", {"Column1"}, {"Column1.Column1"}),&lt;BR /&gt;#"Expanded Column1.Column1" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.Column1", {"id", "email", "is_admin", "is_owner", "is_primary_owner", "is_restricted", "is_ultra_restricted", "is_bot"}, {"Column1.Column1.id", "Column1.Column1.email", "Column1.Column1.is_admin", "Column1.Column1.is_owner", "Column1.Column1.is_primary_owner", "Column1.Column1.is_restricted", "Column1.Column1.is_ultra_restricted", "Column1.Column1.is_bot"})&lt;BR /&gt;in&lt;BR /&gt;#"Expanded Column1.Column1"&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 02:54:50 GMT</pubDate>
    <dc:creator>joshtwork</dc:creator>
    <dc:date>2022-11-17T02:54:50Z</dc:date>
    <item>
      <title>PowerQuery for Slack</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/PowerQuery-for-Slack/m-p/2911242#M27591</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For the life of me, I can't figure out why this doesn't work. I'm trying to get a list of all users of a Workspace, with pagination. I can't seem to get the if statement to work to build the URL to deal with paging. Maybe my approach is wrong, I don't know.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;vUrl = "&lt;A href="https://slack.com/api/admin.users.list?team_id=12&amp;amp;limit=2" target="_blank" rel="noopener"&gt;https://slack.com/api/admin.users.list?team_id=12&amp;amp;limit=2&lt;/A&gt;",&lt;BR /&gt;vHeaders =[&lt;BR /&gt;#"Method"="POST",&lt;/P&gt;&lt;P&gt;#"Authorization"="Bearer " &amp;amp; SlackToken&lt;BR /&gt;],&lt;BR /&gt;theCursor = "",&lt;BR /&gt;GetData =() as table =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;url = if theCursor = "" then vUrl else vUrl &amp;amp; "&amp;amp;cursor=" &amp;amp; theCursor,&lt;BR /&gt;Source = Json.Document(Web.Contents(url , [Headers=vHeaders])),&lt;BR /&gt;tab = Table.Combine({Table.FromList(Source[users], Splitter.SplitByNothing(), null, null, ExtraValues.Error)}),&lt;BR /&gt;theCursor = source[response_metadata][next_cursor]&lt;BR /&gt;in tab,&lt;BR /&gt;Custom1 = List.Generate( () =&amp;gt; [LastCount=2,res=GetData()],each [LastCount]&amp;lt;=3,each [LastCount=Table.RowCount([res])+1,res=GetData()],each [res]),&lt;BR /&gt;#"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),&lt;BR /&gt;#"Expanded Column1" = Table.ExpandTableColumn(#"Converted to Table", "Column1", {"Column1"}, {"Column1.Column1"}),&lt;BR /&gt;#"Expanded Column1.Column1" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.Column1", {"id", "email", "is_admin", "is_owner", "is_primary_owner", "is_restricted", "is_ultra_restricted", "is_bot"}, {"Column1.Column1.id", "Column1.Column1.email", "Column1.Column1.is_admin", "Column1.Column1.is_owner", "Column1.Column1.is_primary_owner", "Column1.Column1.is_restricted", "Column1.Column1.is_ultra_restricted", "Column1.Column1.is_bot"})&lt;BR /&gt;in&lt;BR /&gt;#"Expanded Column1.Column1"&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 02:54:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/PowerQuery-for-Slack/m-p/2911242#M27591</guid>
      <dc:creator>joshtwork</dc:creator>
      <dc:date>2022-11-17T02:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: PowerQuery for Slack</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/PowerQuery-for-Slack/m-p/2914692#M27628</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473181" data-lia-user-login="joshtwork" class="lia-mention lia-mention-user"&gt;joshtwork&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if the following solutions are helpful to you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Power-Query/Power-query-for-pagination/m-p/1848979" target="_blank"&gt;Solved: Power query for pagination - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Henry&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 08:53:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/PowerQuery-for-Slack/m-p/2914692#M27628</guid>
      <dc:creator>v-henryk-mstf</dc:creator>
      <dc:date>2022-11-18T08:53:44Z</dc:date>
    </item>
  </channel>
</rss>

