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?!
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43