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 Apps / IsMatch text(datacardv...
Power Apps
Answered

IsMatch text(datacardvalue) against current user email (lower(users).Email) is not working since authoring version 3.23055.16 - Customize Sharepoint

(1) ShareShare
ReportReport
Posted on by 10

Hello, 
 - Power apps to customize Sharepoint Forms -

we set a field to be shown only if the current user email is contained in another text field and work correctly with the Power Apps release 3.23052.19.

Formula is: IsMatch(Text(DataCardValue304),Lower(User().Email), MatchOptions.Contains and the error we are getting when customizing form is "Regular Expression Must be constant values" 

I try to change the powerapps authoring version to 3.23061.17 (the only one i could choose as alternative) but the problem persists.

 

Have anyone suggestion on how to overcome that problem? 

Thank you,

Luca

Categories:
  • Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @lucalo ,

     

    Do you still face issue if you use following code?

    With(
     {
     TextToCheck: DataCardValue304.Text,
     TextToMatch: Lower(User().Email)
     },
     IsMatch(TextToCheck, TextToMatch)
    )

     

    Hope this helps

  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    @lucalo 

    As far as I'm aware, the second part to IsMatch has never been able to accept a dynamic value (eg User().Email) as highlighted in the documention.

    https://learn.microsoft.com/en-gb/power-platform/power-fx/reference/function-ismatch

    timl_0-1686300006367.png

     

     

    If you want to see if the user name is contained in the text input control, this formula will do it.

     

    (Lower(User().Email) in DataCardValue304.Text)

     

     

  • Verified answer
    Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @timl ,

     

    Thanks for bringing this, although isn't it possible defining as variable then using it?

    Recent Community Post

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Ethan_R 

    I don't think it's possible to work around this with a variable - the documentation states 'without any variables'.

    Does it work for you when you attempt to use a variable?

     

    timl_0-1686301457162.png

     

  • lucalo Profile Picture
    10 on at

    thanks @Ethan_R  and @timl ,
    Using 
    If(Lower(User().Email) in Text(DataCardValue304),true)
    seems to work correctly.
    I didn't aware of the boundaries of ismatch(), and strange things is that is actually working in our customized forms with oldest authoring version created some years ago. I will have to apply correction but at least I know why is in error.

    Bye

  • Emanshu Profile Picture
    30 on at

    We have been utilizing the same formula for Years. So I am also not sure why all of sudden an error is being generated. @microsoft ????

    Also it only provides the error in Edit mode, if we access the application as a user it works correctly. 

    (Lower(User().Email) in DataCardValue304.Text)

    The above does work as an alternative. So thank you for providing a solution. 



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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard