Jump to content

Joining multiple records in a single string

Recommended Posts

  • Newbies

I wonder if someone might be able to help me. We own a pub and I am trying to collate all our recipes. Among other things, I want to print labels that we stick on to any pre-made items, but would like to include all the ingredients. I've got a table for the menu and then a related table that lists all the ingredients. Is there a way of bringing the list of ingredients into one single string like you see on food packaging. The labels can't be too big so listing them a line each would be too much.
Thank you!

Link to post
Share on other sites
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

If recipes - < ingredients ( recipes are related to ingredients, one to many), then you can use List () to gather the related ingredients names. Then you can wrap that in Substitute() to replace the carriage returns with commas. 


Substitute (     List ( "apple" , "banana" , "pear" ) ;     ¶ , ", "  )


you'd have: Substitute ( List ( relatedIngredients::name) ; ¶ , ", "  )

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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