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.

Add an "and" to a list

Featured Replies

I have a field that receives a bunch of first names from a portal, thanks to the List function. The result might look like this:

 

Alice, Bill, Chuck

 

However, I need for the list to read:

 

Alice, Bill, and Chuck

 

 

I need to find the last comma in the text and add an "and" to it. I have been messing around with the Position function stuffed inside of a Substitute function, but I can't get it right. Can someone help?

 

FMPA14

 

 

Rick A.
Pleasanton CA

Hi Rick,

It is best not to create another calculation which adjusts your first calculation because cascading calculations are very slow.  Instead, I suggest that you replace yours with something like this:

Let ( [
values = List ( yourRelatedNames ) ;
pos = Position (  values ; ¶ ; Length ( values ) ; - 1 ) ;
fix = If ( pos ; Replace ( values ; pos ; 1 ; " and " ) ; values )
] ;
Substitute ( fix ; ¶ ; ", " )
)

It is simpler to handle the fix before the substitute. :-)

Edited by LaRetta

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.