Show Hide Fields using JavaScript in Model Driven App

preview_player
Показать описание
This video will teach us how to conditionally show a hide field in model-driven powerapps using Javascript. There are various ways to show the hide field in the model-driven app. You can either use Business Rule or Javascript approach. This video, specifically teach you the JavaScript approach to show hide fields in model-driven application. So, Let's get started.

The video covers below points.
1. How to add Javascript file in model driven app?
2. How to conditionally show/hide fields in model driven app using javascript?
3. OnChange event in model driven app with javascript

Chapters:

00:00 Start
00:30 Real Life Use Case
01:15 JavaScript Function to Show Hide Fields in Model Driven App
05:40 How to Upload JavaScript for Model Driven App?
06:54 Open Model Driven App
07:18 Select Column and add OnChange Event using JavaScript
09:14 Test
09:54 Subscribe!

Code:
function showHideFields(executionContext) {

}
else {
}
}
F O L L O W M E O N S O C I A L M E D I A
================================================================================
Follow my other channel for short content: @DigitalDhruvin

#ModelDrivenPowerApps #PowerApps #PowerPlatform #digitaldhruvin #dhruvinshah #poweraddicts
Рекомендации по теме
Комментарии
Автор

Thank you for sharing. Really helpful.

karanpatel
Автор

I have an issue. I am new to the power platform but I did use your code example but changed it to make Read only on and off. My only thing is that my data type is File. I see your controller is a dropdown which is a select. How can I change my SelectionValue to what?

jonboatnationandstuff
Автор

Thank you for this video. Could you please make another video about how to autofill the people's picker column with a currently logged-in username?

NaomiYoseph-co
Автор

Hi Dhruvin, Thanks a lot for this video, it helped me tackle a similar situation which i was unable to resolve.
i have a situation i want to integrate outlook in the model driven app were i need to have the ability to add events directly from a form in the app and it should be viewed in the calendar view of outlook allowing us to see what is happening that day, is this achievable?

Mohsin.khan.
Автор

Will this not work if i only save it and not save and publish?

acchukatlagousiya
Автор

Please, could you please show the code to allow one to select multiple entries from a field [in your case, it's the department field].
In your case, it wouldn't make sense, since you show and hide something based on a particular dpt, but in my case, it does, as I just need to make the many-to-many association, between a Device and multiple installed Software.
I created a joiner/mapping table between Device and Software, because I wanted to add an "Installation Date" Column to the Device<->Software Map records, and that's where one loses the possibility to select multiple entries which comes with the out-of-the-box many-to-many relationship [without the mapping/joiner table; just creating a many-to-many relationship between the tables].

Thank you in advance.

theintjengineer
Автор

Great Video Dhurvin.
I am new to js web resources, your videos help a lot.
One guestion : Why are following lines needed, what do they do ?

console.log("TRUE ");
console.log("FALSE ")

In your video there is slight difference console.log("FALSE" selectionValue);

I had to adjust your code because if you delete value from Department it will raise an error - did I do it correctly ( below is my code )?

function
var formContext =
var selectedDecLevelObject =
if(selectedDecLevelObject){
var selectedDecLevel =

PLC"){
console.log("TRUE");

}
else {
console.log("FALSE");
}
} else {
console.log("FALSE");


}

}

Thanks

aleksandarbbb
Автор

why would I not use Business rules to hide fields ? and choose JavaScript over Business Rules ?

vinayaktiwari