There does not seem to be an Arcade group for some reason so trying here.
I have been using FeatureSetByName for Feature layers and it works great. But it does not seem to work for tables. I just nothing back from it.
There is not a TableSetByName or anything like that.
So how can I query a table? Tables are left out in the cold in Esri products a lot so I am afraid of the answer.
var sql <SPAN class="operator token">=</SPAN> <SPAN class="string token">"PrimaryKey = '"</SPAN> <SPAN class="operator token">+</SPAN> $feature<SPAN class="punctuation token">.</SPAN>PrimaryKey <SPAN class="operator token">+</SPAN> <SPAN class="string token">"'"</SPAN><SPAN class="punctuation token">;</SPAN>
var tbl <SPAN class="operator token">=</SPAN> <SPAN class="token function">Filter</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="token function">FeatureSetByName</SPAN><SPAN class="punctuation token">(</SPAN>$map<SPAN class="punctuation token">,</SPAN><SPAN class="string token">"Photos"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> sql<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
var link <SPAN class="operator token">=</SPAN> <SPAN class="string token">''</SPAN>
<SPAN class="keyword token">for</SPAN> <SPAN class="punctuation token">(</SPAN>var f in tbl<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
link <SPAN class="operator token">=</SPAN> f<SPAN class="punctuation token">.</SPAN>PhotoLink
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">return</SPAN> link
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>tbl comes back blank
thanks