<?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 API loop with List.Empty - access column from previous step in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889613#M52155</link>
    <description>&lt;P&gt;Thanks to &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;, I found a tip to terminate an &lt;A href="https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-IsEmpty-not-working/m-p/3230891" target="_self"&gt;API loop with List.Empty&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However my reference to the projNo column in the List.Generate() is erroring when I expand the table list.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="api 2024-05-03_08-41-37.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1091264i1F19D6CA1AA6C93B/image-size/large?v=v2&amp;amp;px=999" role="button" title="api 2024-05-03_08-41-37.jpg" alt="api 2024-05-03_08-41-37.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#"02ListGenerate = Table.AddColumn(#"01filterProject", "dRofusRecord", each List.Generate(() =&amp;gt;
		[proj = [projNo], skip = 0,  top = 50, recordList = getURI(proj, top, skip)],

		each not List.IsEmpty([recordList]),
	
		each [proj=[projNo],
			skip = [skip] + [top], 
			top = [top],
			recordList = getURI(proj, top, skip)]
))&lt;/LI-CODE&gt;&lt;P&gt;Thank you for any guidance.&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2024 15:48:36 GMT</pubDate>
    <dc:creator>MarkusEng1998</dc:creator>
    <dc:date>2024-05-03T15:48:36Z</dc:date>
    <item>
      <title>API loop with List.Empty - access column from previous step</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889613#M52155</link>
      <description>&lt;P&gt;Thanks to &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;, I found a tip to terminate an &lt;A href="https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-IsEmpty-not-working/m-p/3230891" target="_self"&gt;API loop with List.Empty&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However my reference to the projNo column in the List.Generate() is erroring when I expand the table list.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="api 2024-05-03_08-41-37.jpg" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1091264i1F19D6CA1AA6C93B/image-size/large?v=v2&amp;amp;px=999" role="button" title="api 2024-05-03_08-41-37.jpg" alt="api 2024-05-03_08-41-37.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#"02ListGenerate = Table.AddColumn(#"01filterProject", "dRofusRecord", each List.Generate(() =&amp;gt;
		[proj = [projNo], skip = 0,  top = 50, recordList = getURI(proj, top, skip)],

		each not List.IsEmpty([recordList]),
	
		each [proj=[projNo],
			skip = [skip] + [top], 
			top = [top],
			recordList = getURI(proj, top, skip)]
))&lt;/LI-CODE&gt;&lt;P&gt;Thank you for any guidance.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 15:48:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889613#M52155</guid>
      <dc:creator>MarkusEng1998</dc:creator>
      <dc:date>2024-05-03T15:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: API loop with List.Empty - access column from previous step</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889623#M52156</link>
      <description>&lt;P&gt;What's the error message?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 15:52:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889623#M52156</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-03T15:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: API loop with List.Empty - access column from previous step</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889725#M52157</link>
      <description>&lt;P&gt;Expression.Error: The field 'projNo' of the record wasn't found.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="api 2024-05-03_09-20-24.jpg" style="width: 514px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1091311iBC967C0E0718E9F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="api 2024-05-03_09-20-24.jpg" alt="api 2024-05-03_09-20-24.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;getURI()&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(projNo as text, topVal as number, skipVal as number)=&amp;gt;
let
    #"FilterColumnTable" = Table.SelectRows(#"102APImapRooms100", each ([ObjectType] = "rooms")),
    GetWebContents =
        Web.Contents(
            "https://api-us.drofus.com/api/company/",
            [
                RelativePath= projNo
                &amp;amp; "/rooms" 
                &amp;amp; "?$select=" &amp;amp; Text.Combine(#"FilterColumnTable"[dRofus.ID], ",")
                &amp;amp; "&amp;amp;$top=" &amp;amp; Number.ToText(topVal)
                &amp;amp; "&amp;amp;$skip=" &amp;amp; Number.ToText(skipVal) 
            ]
        ),
    convertedJson = Json.Document(GetWebContents,65001),     
        in
            convertedJson&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 May 2024 16:58:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889725#M52157</guid>
      <dc:creator>MarkusEng1998</dc:creator>
      <dc:date>2024-05-03T16:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: API loop with List.Empty - access column from previous step</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889775#M52158</link>
      <description>&lt;P&gt;In the List.Generate() I changed proj=[projNo] to projNo = [projNo].&lt;/P&gt;&lt;P&gt;This now works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(#"01filterProject", "dRofusRecord", each List.Generate(() =&amp;gt;
[projNo = [projNo], skip = 0,  top = 50, recordList = getURI(projNo, top, skip)],

each not List.IsEmpty([recordList]),

each [projNo = [projNo],
      skip = [skip] + [top], 
      top = [top],
       recordList = getURI(projNo, top, skip)]
))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt; for prompting the question. I appreciate this forum because submitting the question forces me to better understand the "problem statement."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 17:24:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-loop-with-List-Empty-access-column-from-previous-step/m-p/3889775#M52158</guid>
      <dc:creator>MarkusEng1998</dc:creator>
      <dc:date>2024-05-03T17:24:05Z</dc:date>
    </item>
  </channel>
</rss>

