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 Pages / How can I write a regu...
Power Pages
Answered

How can I write a regular expression that involves one datatype column to not be lower than another?

(1) ShareShare
ReportReport
Posted on by 520
Categories:
I have the same question (0)
  • Verified answer
    Hugo Bernier Profile Picture
    Microsoft Employee on at

    The Regular Expression functionality is to validate that the content of a given field matches a certain pattern; it receives the field's value and does not get access to the other fields.

     

    If you want to compare two fields, the easiest way to do this at the moment is to add form validation using Javascript.

     

    Go to the Portal Management app (from the Apps tab in make.powerapps.com) and navigate to Basic Forms .

     

    Find the where you want to add validation and open it. Find the Additional Settings tab and scroll to the Custom JavaScript section and add the script you want compare two fields.

     

     

     

    $(document).ready(function() {
     // Your logic goes here
    });

     

     

    If you want to find a good example of injecting a validator to a page, with full code, check this post, it should get you started.

     

    I hope this helps?!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 36

#2
Valantis Profile Picture

Valantis 32

#3
omkarsupreme Profile Picture

omkarsupreme 25

Last 30 days Overall leaderboard