Model Driven Apps Archives - Impulz Technologies LLC https://impulztech.com/tag/model-driven-apps/ Microsoft Dynamics and Power Platform consulting company Tue, 27 Sep 2022 15:37:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://impulztech.com/wp-content/uploads/2022/08/cropped-impulz-tech-32x32.png Model Driven Apps Archives - Impulz Technologies LLC https://impulztech.com/tag/model-driven-apps/ 32 32 Microsoft Power Apps: Code debugging in Model-driven App https://impulztech.com/microsoft-power-apps-code-debugging-in-model-driven-app/ Tue, 27 Sep 2022 15:37:18 +0000 https://impulztech.com/?p=2702 Debugging is an essential part of software development. As Microsoft Power Apps is a low code no code approach still sometimes there is need of small JavaScript code snippets for particular events e.g. onChange in Model-driven apps. In order to debug the code snippet in your deployed power app you can follow the following steps. […]

The post Microsoft Power Apps: Code debugging in Model-driven App appeared first on Impulz Technologies LLC.

]]>

Debugging is an essential part of software development. As Microsoft Power Apps is a low code no code approach still sometimes there is need of small JavaScript code snippets for particular events e.g. onChange in Model-driven apps.

In order to debug the code snippet in your deployed power app you can follow the following steps.

  1. In the code snippet add debugger keyword in the code where you want to place your debugging point.
  2. After reuploading the updated snippet start your app on Google chrome browser and press F12 to open developer tools.
  3. When you trigger the event for which the code was written debug point will hit and from there you can debug your JavaScript code embedded in your power app. Use F10 to move to next line and F11 to step into the next function.

Hope you have found it helpful. Cheers.

The post Microsoft Power Apps: Code debugging in Model-driven App appeared first on Impulz Technologies LLC.

]]>
Model-Driven Apps – Update field based on other field value using OnChange event https://impulztech.com/model-driven-apps-update-field-based-on-other-field-value-using-onchange-event/ Tue, 13 Sep 2022 17:10:30 +0000 https://impulztech.com/?p=2673 As Power Apps (Model-Driven Apps) developers, often we face this scenario of triggering a change of value in one field when a value in another field is modified. In this blog we are going to see how to apply OnChange event in a model driven app field to trigger values in another field. First of […]

The post Model-Driven Apps – Update field based on other field value using OnChange event appeared first on Impulz Technologies LLC.

]]>

As Power Apps (Model-Driven Apps) developers, often we face this scenario of triggering a change of value in one field when a value in another field is modified. In this blog we are going to see how to apply OnChange event in a model driven app field to trigger values in another field.

  1. First of all, create a solution and in that solution create a table or add any existing table (here I have created a new table named TestOnChange). Then go to the table and select form options.

2. In Forms option there are multiple form designs but for our case we will use the main one which is usually used for create new records or edit record.

3. Edit the form and you will be on the following screen. From the right-side panel select event tabs and click on Add Library.

4. This will let you include already added JavaScript file which contains the OnChange event code or you can add a new one. In our case we will add a new file in which the logic is written.
Note: You can also add this file under web resources of your solutions before adding from this dialog.

 

 

5. The code in the JavaScript file is below where getAttribute refers to the logical name of the field.

Note: To check the logical name of the field you can go to the following tab.

6. After adding the file you will see OnChange option on the event tab. Select the field first on which you will apply the event and click on Event Handler.

7. Set the following properties. Function is the name of the function defined in the JavaScript file which will be called on OnChange event.

8. Once done select the table field which will trigger this OnChange event.

9. Once all steps are done just save and publish your app. Now whenever the Name values is changed the OnChange trigger will update the value in FirstName field as defined the JavaScript function.

The post Model-Driven Apps – Update field based on other field value using OnChange event appeared first on Impulz Technologies LLC.

]]>