In this blog we can see how to use getIsDirty in Powe platform.

Login to Powerapps  using make.powerapps.com

In navigation bar select solutions Select the College admission that you have created.

In the solution navigate to Webresources & create a new webresource by using following steps.

Write the following code in VisualStudio or  VisualStudioCode  & save to system in .js format.

·       
function onLoad(executionContext) {

 var formContext =executionContext.getFormContext()


    var name = formContext.getAttribute(“schemanameofafeild”).getValue()


    var isDirty = formContext.getAttribute(“schemanameofafeild”).getIsDirty();

alert(isDirty); // returns true
if the field is dirty

}

 In Power Apps Webresources->New->More->Webresource

In Web resources choose the file from system that we have saved

Save & Publish the webresource.

Navigate to tables-> select table->forms->mainform

In main form select events and add the web resource to the form events  onload using Event handler.

Save & publish the customizations and test in your model driven app .

 

See when i had changed the name it was showing alert true that means its working.