top of page

It's all about Data(utomation)

  • Foto van schrijver: Frank Vanhamel
    Frank Vanhamel
  • 3 aug 2022
  • 2 minuten om te lezen

Hello everyone, in this blog post I will guide you through the process of applying a Webresource on the OnChange of a field from a ModelDriven PowerApps backoffice application.

This can help you in a business scenario where for example you have a status field and based on the value you're choosing this will automatically update another date field. Ideal when you want to know at which data the status of the project was set.


Let's take a closer look on how you can apply this in your PowerApps Solution. At the end for me it's all about data and getting data through a processflow.

Imagine that we have a custom Solution in PowerApps in which we have a custom entity called 'Project'.

Within this custom 'Project' entity I've created a status field and a status date field. The status field is a of type choice with 2 choice values (created and planned).

Next to this project status field we also have a date field to capture at which moment in time the project was set to 'Planned'.


Okidoki, I a next step I've also added those 2 columns or fields on the Project form. Click on the 'Switch to classic' mode and select the 'Form properties' button.

First let's add a new Form Library by clicking on the 'Add' button in the upper pane.

Click on the 'New' button in following printscreen.

Give in some good names and description for your webresource and use JScript as type.

Click on the Text Editor to define your function. This could be the case. Retrieving the current status of the project and checking if the value equals the planned status. If the case, setting the planned date field. Save and publish your Webresource component.

The Web Resource is now available in your form library. As a final step we will have to apply it on the On Change event of our status field. Go to this status field and double click on it.

Add the newly created Web Resource function to the OnChange event from the status field.

And the result

See you folks!!

Frank Vanhamel

Power Platform Evangelist

Komentáře


©2022 by Frank Vanhamel - Copyright

bottom of page