I’d like to dynamically concatenate several paragraphs into a single Text(64000) field using Triggers.
I have a table calledtab_Responsesthat a customer updates. In this table I update a field calledTrigger_Runwith Trigger_Run = ‘Update Para’ when I’m ready to create the concatenated field. I also have a field calledProfessionthat I want to use to identify the paragraphs to combine, this stores a profession such as ‘Fire Eater’. I also have a field calledConcate_Parathat stores the final concatenated paragraph.
Then I have a table calledtab_Paragraphswhere 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 calledtab_Profession_Paragraphswhere 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?
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.
Question
JKSGT
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.