Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Distinct Value but return different column.

Featured Replies

I am trying to get a list of UIDs from a select for Distinct CatalogNumber WHERE Tech = TechName

 

UID

CatalogNumber

Tech

 

Just can't seem to get the syntax right.

What does your full statement look like? 

 

Try this: 

SELECT (Distinct X),OtherColumn FROM tableName WHERE Tech = TechName
  • Author

Thanks, tried that one but that gives me two columns in the results

 

The UID is unique by nature. 

 

I want all the CatalogsNumbers by a Tech 

 

0111-TS,1556,Joe
0111-TS,1557,Joe
0111-TS,1558,Joe
0777-TS,1559,Joe
0777-TS,1560,Joe
0744-TS,1780,Joe
0744-TS,1820,Joe
 
The goal would be
 
1556
1559
1780

I'm not sure of a way to do exactly what you're asking, but here's a few options...

 

If you're able to get the data you need, but are just trying to get rid of that extra column of data, you may be able to use ColumnSlice: https://github.com/jbante/FileMaker-Techniques/blob/63b4ffdf518a1016aae9665e2d1818f26788b886/CustomFunctions/SQL/ColumnSlice.fmfn

 

Alternatively, I suspect a Fast Summaries type of method would be quicker:

  1. Perform find by Tech
  2. Sort by CatalogNumber
  3. Go to first record
  4. Loop:
    1. Save UUID to a $list
    2. $nextGroup = Table::summaryCountId + Get ( RecordNumber )
    3. Exit Loop If $nextGroup > Get ( FoundCount )
    4. Go to record by number [$nextGroup]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.