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.
Juggernaut

custom function and GetNetRecord

Featured Replies

In a project table, I have an unstored calculation field that returns the name of all the employees who have entered timesheets related to a specific project.

The names are separated by comas and are gathered together with a custom function that makes use of the new GetNthRecord function via a relationship (thanks to John Mark Osborne for this one).

Because employees could have entered several timesheets for the same project, their name can appear several time. The result of the calculation looks like : Robert Smith, Mark Lambert, Louise Mitchell, Dave Richards, Robert Smith, Dave Richards, Mark Lambert, Dave Richard.

I would like to eliminate duplicate names and end up with only one occurrence for each employee. Ex: Robert Smith, Mark Lambert, Louise Mitchell, Dave Richards.

I would like to do it without using a script, only with calculations.

I initially thought I could add an IF statement in my custom function in order to return the name of an employee only if it is not already there, but I have struggled to do it so far.

My second option would be to build a another calculation that parses the first calculation and get rid of duplicates, with the use of Substitute and PatternCount function... But I'm also struggling to do it...

If someone understands what I'm trying to do, I would appreciate a little help !

Thanks

I'm out of my depth here, but I've read in other threads that you can use the ValueListItems function to get a list of unique entries in a field.

HTH,

David

Yes, a value list eliminates duplicates.

Alternatively, if I am guessing correctly that your Timesheets table is joining Employees to Projects, you can simply point your exisiting function to the Employees table rather than to Timesheets.

  • 3 months later...
  • Author

Sorry for the delay, but I just wanted you to know that I used the Value List option and it works just fine. I don't know why I didn't think of using it in the first place. I guess I wanted to use the new GetNthRecord so badly that I forgot to look at other more simpler options !

Thanks again

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.