Jump to content
  • 0

Concatenate several paragraphs into a single Text


JKSGT
 Share

Question

Concatenated into Text(64000) Field 
 
I’d like to dynamically concatenate several paragraphs into a single Text(64000) field using Triggers.
 
I have a table called tab_Responses that a customer updates. In this table I update a field called Trigger_Run with Trigger_Run = ‘Update Para’ when I’m ready to create the concatenated field. I also have a field called Profession that I want to use to identify the paragraphs to combine, this stores a profession such as ‘Fire Eater’. I also have a field called Concate_Para that stores the final concatenated paragraph.
 
Then I have a table called tab_Paragraphs where I store the template paragraphs.
 
Paragraph
Text
1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
2
Nunc faucibus sem purus. Suspendisse fermentum id magna nec pulvinar. 
3
Donec auctor feugiat justo, sed convallis nunc malesuada ut.
 
 
And I have a table called tab_Profession_Paragraphs where I store lists of paragraphs to appear for each profession. For example:
 
Profession
Paragraph
Fire Eater
1,2, 3
Lion Tamer
1,2
Clown
1,3
Juggler
1
 
 
Result
 
So I’d like the outcome to be something like this:
- If Profession = Fire Eater then lookup tab_Paragraphs and concatenate Paragraph_01, Paragraph_02 and Paragraph_03 and store them in Concate_Para.
- If Profession = Lion Tamer then lookup tab_Paragraphs and concatenate Paragraph_01 and Paragraph_02 and store them in Concate_Para.
- If Profession = Clown then lookup tab_Paragraphs and concatenate Paragraph_01 and Paragraph_03 and store them in Concate_Para.
 
I wonder if anyone has any thought for how I could set up a trigger to achieve this as the logic is escaping me at the moment?
 
Many thanks
Jay
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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.

Guest
Answer this question...

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

Loading...
 Share

×
×
  • Create New...