Only() returns a value if there is one and only one possible result from the aggregated data. If records contain only one value then that value is returned, otherwise NULL is returned. Use the group by clause to evaluate over multiple records. The Only() function can return numeric and text values.
Return data type: dual
|The expression or field containing the data to be measured.
Examples and results:
Add the example script to your app and run it. Then add, at least, the fields listed in the results column to a sheet in our app to see the result.
To get the same look as in the result column below, in the properties panel, under Sorting, switch from Auto to Custom, then deselect numerical and alphabetical sorting.
LOAD * inline [
] (delimiter is '|');
LOAD Customer, Only(CustomerID) as MyUniqIDCheck Resident Temp Group By Customer;
because only customer Astrida has complete records that include CustomerID.