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 / 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.
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 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

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard