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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Getting Invalid expres...
Power Automate
Unanswered

Getting Invalid expression

(1) ShareShare
ReportReport
Posted on by 18

Was trying to build a simple cloud flow that looped a few times after reading the name of an account that ended FBO

I am having a problem with getting my code below to be accepted, I keep getting "invalid expression" on the editor and I do not understand why. I was going to use the RIGHT function but that does not seem to be an option, so I came up with what I have below to pull the last three letters so I can check to see if the record has FBO on the end.


substring(body('Get_a_row_by_ID')?['name'],(length(body('Get_a_row_by_ID')?['name'])-3),3)

Below is a picture of my current flow
and an image of my problem
eccountable_dev_1-1720721739623.png

 


eccountable_dev_0-1720721666137.png

 

Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @eccountable_dev 

     

    Try this expression 

    substring(body('Get_a_row_by_ID')?['name'],sub(length(body('Get_a_row_by_ID')?['name']),3),3)

     

    Also there is no -,+ operator used in expression- have to use add, sub functions instead.

     

    Also if you want to check whether a string ends with FBO- use following expression in condition directly instead of using substring and then comparision

    endsWith(body('Get_a_row_by_ID')?['name'],'FBO')
    The above expression gives a boolean value whether the string ends with FBO or not 🙂
     
    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌


  • eccountable_dev Profile Picture
    18 on at

    This helped! Thank you!

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 463 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 427 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard