If you want to create a Cancel Button in Power Apps Portal follow the Below Steps:

1.Go to the portal’s web page where you want to place the cancel button.

2.Paste the  following code in Custom Jscript field under Advanced section.

$(‘#InsertButton’).after(‘<input type=”button” value=”Cancel” onclick=”javascript:clearIsDirty();disableButtons();window.history.back();” id=”CancelButton” class=”btn btn-primary”/>’)

In the above code, InsertButton is the id of the button.

NOTE:Ensure that you can also include this code on the content pages.

Now save and sync configuration and reload the Portal  page. You will see the Cancel Button  like the below page.

For any Help or Queries Contact us on info@crmonce.com or +918096556344.