Skip to main content
luisr0004
Known Participant
Feb 28, 2025 5:03 AM UTC
Solved

fn!extract does not like letter p??

Hi All,

For any reason I can't imagine, if you run this instruction in a rule;

fn!extract("<a>some text</a>","<a>","</a>")

you will get {"some text"} as a result, which is what I expected.

But if you run this one

fn!extract("<p>some text</p>","<p>","</p>")

you get nothing as result.

Another example of this strange behaviour:

fn!extract("<l>some text</l>","<",">") returns {"l","/l"}, which is fine

fn!extract("<p>some text</p>","<",">") returns nothing, which is inexplicably to me

Any idea on why is that happenning?. I've tested that on Appian v25.1

Regards!

    stefanhelzle0001
    Brainy
    Feb 28, 2025 4:08 PM UTC

    9 replies

    karumurua531442
    Participating Frequently
    Feb 28, 2025 5:28 AM UTC

    i think in this scenario, striphtml() might work?  since  striphtml() Converts an HTML string into plain Text by converting <br>, <p>, and <div> to line breaks, stripping all other tags, and converting escaped characters into their display values

    striphtml("

    some text

    ")

    luisr0004
    luisr0004Author
    Known Participant
    Feb 28, 2025 5:37 AM UTC

    Thank you for your answer Abishek, however I do not looking forward some workaround (I've already solved my need with regex). My intention when posting that is to know why fn!extract is working like this. ¿It is a bug or some weird undocumented behaviour?

    stefanhelzle0001
    Brainy
    Feb 28, 2025 7:41 AM UTC

    I can replicate this on 24.4. I suggest to open a support case to discuss this with Appian.

    karumurua531442
    Participating Frequently
    Feb 28, 2025 7:47 AM UTC

    So is there any special conditions that Appian would not parse <p> tags ?

    stefanhelzle0001
    Brainy
    Feb 28, 2025 7:48 AM UTC

    That's the question only Appian can answer.

    stefanhelzle0001
    Brainy
    Feb 28, 2025 4:08 PM UTC
    luisr0004
    luisr0004Author
    Known Participant
    Feb 28, 2025 6:17 PM UTC

    Thank you Stefan