achieving 'select DISTINCT'

Hello everybody,

I have a CDT/Table 'assets' with the following structure:

idasset (primary,unique)
typeofasset                    : text
manufacturer           : text          
model                              : text

Now I would realize the following query (to be used in a form):
select distinct typeofasset from assets

But in documentation I did not find any connection to clause 'distinct', nor in query rules, neither in querySelection()

I have tried the following workaround (!!!) in file attached:

/* workaround to get unique values */
local!uniqueAssetsAvailables: union(
          local!assetsAvailables.data.typeOfAsset,
          local!assetsAvailables.data.typeOfAsset
),

Could someone please suggest a better solution? (we are using ver 7.1.0)

Thank you in advance for your help, best regards.
Paolo

OriginalPostID-265665


forum_distinct.txt

  Discussion posts and replies are publicly visible