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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to use a "contain...
Power Automate
Suggested Answer

How to use a "contains" similar function with Power FX within Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by 4
I need to perform a validation with Power FX within Power Automate Desktop that verifies if the variable "LinePDF" contains a value such as "Issue Date" and then assigns that value to a new variable called "Date"

 I've been looking through the functions that Power FX brings but there is none like "Contains". 

So far I have tried with the "StartsWith" function but I get the following error:

Invalid argument type (Record). Expecting a Text value instead. The function 'StartsWith' has some invalid arguments.

The code I have tried so far is the following:






It's important to note that I have Power FX enabled.

If you have any suggestions or would like to tell me what I am doing wrong, I would appreciate it.
Screenshot 2025-01-09 123722.png
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Moderator on at
    You should have a Contains operator as an option for your If statement.  If you don't see it, perhaps try updating PAD?
     


    You can also try using "Parse Text".  You can search for string or use a RegEx expression.  It outputs a position number. 
    If no text is found it outputs -1, so you can have a condition check for the "Position" output being greater than -1

  • Suggested answer
    CU03011658-0 Profile Picture
    2 on at
    I just had the same problem and finally found the answer. @@Mark Nanneman
     
     
    The function is called "in"
     
    (i am german, so all this is in german) with this function it is looking for the string "Herr" in my variable called "NameHerrFrau" containing the text "Herr Michael Vanguard" or so.

    @Mark Nanneman:  what you show is the solution when power fx is not turned on. if you turn it on, you have much less choice in the if function, but much more possibilities with the formulars you put in.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard