I have a jotform returning data which I has a line break at the end, and possibly some other data I can't see.
"Test
"
I am using a switch control, which looks for x equals y
So when I run the flow I don't get True for equals "Test"
(nor do I get True for equals "Test
")
However I do get True for contains "Test"
What can I do to the initial variable to just get the clean text so I can do the equals comparison I need in the switch control?
I have tried using trim() with no success.
Many thanks for any help
Solved! Go to Solution.
Hi!
So let's assume you have your text stored on a variable called 'myInputString', type string, value
Test
Please note there are two-three line breaks in the value
In order to remove the line break, my suggestion is to use this old trick, which is the following expression:
replace(variables('myInputString','
','')
Please remember to hit 'enter' to declare the expression
Hope this helps
Take care and stay healthy!
Proud to be a Flownaut!
Hi!
So let's assume you have your text stored on a variable called 'myInputString', type string, value
Test
Please note there are two-three line breaks in the value
In order to remove the line break, my suggestion is to use this old trick, which is the following expression:
replace(variables('myInputString','
','')
Please remember to hit 'enter' to declare the expression
Hope this helps
Take care and stay healthy!
Proud to be a Flownaut!
Hi,
I have a similar problem. I'm using "html to text" to convert the body of an email to a string. The problem is that "html to text" inserts a line break in the middle of the text that shows up in the resulting excel table.
I've tried using the following formula and using your trick with replace(), but when I hit enter nothing happends, it just leaves an empty string. Resulting in the error pictured below. I've also tried \n, but that results in an formula-error where I'm not allowed to save my changes to the formula.
replace(first(skip(split(first(split(body('Html_to_text'),'Produksjonsperiode: ')),'Tittel: '),1)),'',' ')
I've tested all the separate parts, and when the program outputs only skip() without the last first() the resulting array saved in Excel show that there is indeed a \n in the text.
I guess I'm misunderstanding something here. Can you help me with this issue?
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.
User | Count |
---|---|
26 | |
25 | |
22 | |
22 | |
12 |
User | Count |
---|---|
45 | |
33 | |
31 | |
31 | |
30 |