Forum Discussion

TamaraBillings's avatar
TamaraBillings
Qrew Cadet
5 years ago

How to include an "", and"" before the last text item in a formula using the List function with a comma delimeter?

I have a formula field that uses the list function with the comma delimiter.  It works fine, but I'd  like to include the word ", and" before the last listed item.  Is this possible with this function alone?  If yes, what is the syntax? 

Thank you,

3 Replies

  • This seems to test OK.  In my case I have assumed that your delimited is actually a comma space, as opposed to just a comma.

    so

    apples, peaches, pears, plums 

    would translate to 

    apples, peaches, pears and plums

    You can either make a new field for this based on your current field or if you post the current formula for your list, I can help you with the new formula all in the same formula box, if you need help with that. 



    If(  // first check that we have at least one comma, else nevermind the and    Trim(Part([My Comma Delimited List field],2,","))="",  [My Comma Delimited List field],     // everything up to the last comma  NotRight([My Comma Delimited List field],",")    // "and" everything after the last comma  & " and" & Right([My Comma Delimited List field],","))