web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using IF formula after...
Power Automate
Unanswered

Using IF formula after email body split not working

(0) ShareShare
ReportReport
Posted on by 380

Hello!!

 

I am trying to obtain certain data from an email body and convert them into different acronyms.

 

So far, I was able to extract the info I needed with a split formula, and identifying each parameter

 

Fernanda_0-1653406985916.png

split(outputs('Html_a_texto_Cuerpo_email')?['body'],outputs('Tecla_Enter'))
 
Fernanda_1-1653407021780.png

This is the result I need.

 

This, so far, works perfectly.

 

But, and here is my main issue, is that I need to turn that result into an acronym.

For example: Aguas A S.A. has to be turned into ARA, Aguas Al into ADA, and so on.

I was using an if formula, adding an equals: 

if(equals(outputs('Empresa'),'Aguas A S.A.'),'ARA','OTHER')
Note: OTHER is supposed to be another formula comparing Aguas Al into ADA and so on, but tried to test the logic first.
 
And here, no matter what I do, I keep getting OTHER as result, when it is supposed to be a true result and show ARA.
Tried initialiazing a variable as string, using " character... but nothing.
 
Fernanda_2-1653407637215.pngFernanda_3-1653407649117.png

 

 
Can you help me please?
Thank you in advance!!
Categories:
I have the same question (0)
  • Verified answer
    v-liwei-msft Profile Picture
    on at
    Re: Using IF formula after email body split not working

    Hi @Fernanda ,

     

    Your compose "Empresa" returns an array instead of a string.

    You can use the join function to convert the result into a string and compare it:

    if(equals(join(outputs('Compose'),','),'Aguas A S.A.'),'ARA','OTHER')

     I have made test for your reference:

    vliweimsft_0-1653557765232.png

     

    vliweimsft_1-1653557765235.png

     

    Best Regards,

    Levi

  • Fernanda Profile Picture
    380 on at
    Re: Using IF formula after email body split not working

    brilliant!!

    thank you so much!!!

    I had also tried with a initializing a variable thinking it could have convert the array into a string. This totally fixed my issue.

    Thank you so so so much!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard