Dynamic text value with SQL Expression return first record

521
3
01-18-2023 06:44 AM
ZacharyHart
Occasional Contributor III

Experimenting a bit with dynamic text and table attributes which is listed as 'value' in the dynamic text dialog. 

I see you can use a few options that would limit the resulting return for 'All records', 'Visible records', and 'Custom Query'. The custom query expression uses SQL and would have a default of something like: sql="OBJECTID = 1". You can use the SQL expression builder but unfortunately it does not recognize table names which is unfortunate. 

A typical dynamic text may look like this:

<dyn type="table" property="value" mapFrame="Main Map Frame" mapMemberUri="CIMPATH=location_map/forest_types.json" sql="OBJECTID = 1" arcade="&apos;CLIENT: &apos;+$feature.CLIENT" delimiter=" "/>

I'd like to be able to use an SQL statement to return only the first record but not having any luck. 

SELECT FIRST(column_name) FROM table_name;

Is any of this possible?

 

3 Replies
KariBuckvold
Occasional Contributor

did you ever figure this out? I would really like to do this as well!

0 Kudos
ZacharyHart
Occasional Contributor III

Supposedly the Arcade Distinct function will be working in the 3.2 release...(several years after it was first shown in the documentation).

You can read comments from others here.

KariBuckvold
Occasional Contributor

thanks for the reply, @ZacharyHart ,too bad we can't use python and use 'set' in the meantime.

 

0 Kudos