+ Start a Discussion
Brad GreeneBrad Greene 

Using Flow to Grab Lines of Text Area Into Individual Variables

In a custom object, I have a Text Area(255) field in which a user can input stock numbers, one per line. What I would like to do with a flow is take those lines and assign them into individual variables with the purpose of iterating through each of those stock numbers assigning them to a campaign specified earlier in the object. The flow will be an auto-flow kicked off by a Process Builder process. I know how to accomplish everything except pulling the lines of the text area into individual variables. I would like to avoid any Apex code if possible, as our org is getting fairly close to the limit there. Thank you in advance for any help!
NagendraNagendra (Salesforce Developers) 
Hi Brad,

Please check with below link from stack exchange community with similar discussion and suggested workaround. Regards,
Pankaj MehraPankaj Mehra
Hi Brad,

I suggest Apex trigger to perform the above operation
List<String> lstStockNumber = stockNumberField__c..split('\n')

You can use this apex code in Process builder as well in Execute Apex section.