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:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 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
    36,774 Super User 2026 Season 1 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,838 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
    36,774 Super User 2026 Season 1 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

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 Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard