Select to view content in your preferred language

Dynamic text value with SQL Expression return first record

852
3
01-18-2023 06:44 AM
ZacharyHart
Honored Contributor

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
Frequent Contributor

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

0 Kudos
ZacharyHart
Honored Contributor

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
Frequent Contributor

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

 

0 Kudos