0

I have a text area (multiline) field with approx 15-20 lines of text. e.g. this is some test text : true this is also some test text : false this is another test text : false this could be one more line of text : true

I want to remove the line for which the value is false.

Can I do this in workflow with field update or in code using trigger?

sandroid
  • 1
  • 1
  • the text that i have given as example is new line everytime – sandroid Jul 31 '19 at 18:22
  • Can you explain why you're doing this? This seems like an XY problem https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem – TemporaryFix Aug 01 '19 at 02:31
  • I have field which is getting mapped with all values from application and then i am removing some values from it. After that i want to remove the new lines and whitespace left in it – sandroid Aug 02 '19 at 05:01
  • Maybe you should structure this data to be json format in the Salesforce field. It will be a lot easier to manipulate – TemporaryFix Aug 02 '19 at 13:18

1 Answers1

0

You could do this with a Flow that is triggered when the field is updated or you could do it in an apex trigger. I would suggest taking the Flow route as it is easier to maintain and you won't have to write tests for it. The principal of what you're trying to achieve in the Flow is laid out here you are just splitting by a colon rather than a space. Hope this helps

EDIT: I believe they are called flows or visual flows I am assuming you meant this instead of a workflow rule

KDH
  • 371
  • 3
  • 8
  • Actually I meant workflow rule but this situation is very specific to an app installed on SF and also dealing with fields created by this app and some field mapping. so it won't be easily possible. But thank you for looking into it and replying KDH. – sandroid Nov 14 '19 at 23:25