Any hints on how I can add a line break in a workflow variable?
In essence, I’m using workflow to send a text message using an API, and I’d like to put a line break in between a couple of the data elements. For some reason, I thought there was a line break you could drag up from the TEXT operators, but now I’m not seeing it.
Anyway, any help is always appreciated.
Page 1 / 1
can you use URL Decode function to convert to line-break?
I know you can use the join function to insert line breaks between SmartObject data lists:
Im not sure how this will work on a text message, but I used it in an email and it works fine.
Im not sure how you would implement it in your scenario, if this isnt helpful can you explain what your data elements are/what they need to do if possible. Screenshots will also be helpful.
Kind Regards
Prineel
I tried the URL Encode and it didn’t seem to work. I could have been doing it wrong. I’ll try @Prineel ‘s idea when I get a moment today.
Thanks to you both!
Rob
If out-of-the-box function can’t do the job, It’s always possible to create advanced smartobject (SQL Server store procedure), you pass the value to stored procedure, do the necessary logic and return as select statement ( smartobjects with List method).
Example Stored Procedure
CREATE PROCEDURE CONVERTCRLF (@INPUT NVARCHAR(MAX)='',@CRLFTAG NVARCHAR(50)='') AS BEGIN DECLARE @RESULT AS TABLE (OUTPUT NVARCHAR(MAX))
INSERT INTO @RESULT(OUTPUT) SELECT REPLACE(@INPUT, @CRLFTAG, (CHAR(13)+CHAR(10)));
SELECT * FROM @RESULT END
Test :
EXEC CONVERTCRLF 'LINE1<BR>LINE2<BR>LINE3','<BR>'
Output :
OUTPUT
1
LINE1
LINE2
LINE3
You can generate smartobject for the above stored procedure, Smartobject Tester will generate method List for CONVERTCRLF
You can place <BR> in your messages and use CONVERTCRLF smartobject to convert to CrLf and send the output directly to API. ( do not store in workflow variable)