I can't see the difference between these two expressions.
I started with the first expression failing due " 'substring' parameters are out of range", but I thought the if condition would make it skip the first condition and therefore not evaluate it. Strangely the second expression works.
If(contains(body('Html_to_text'),'-::-::-::-'),substring(body('Html_to_text'),0,indexOf(body('Html_to_text'),'-::-::-::-')),body('Html_to_text'))
substring(body('Html_to_text'),0,If(contains(body('Html_to_text'),'-::-::-::-'),indexOf(body('Html_to_text'),'-::-::-::-'),length(body('Html_to_text'))))As I said it works now, but I am just curious.
N
EDITED: there was a ) missing at the end of the second expression when I copied it
2nd Edit: Sorry I made a mess in copying the second expression. now it is correct and it works. working late at might ...


Report
All responses (
Answers (