Using JavaScript in Power Apps Portals to Hide and Show Fields

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

ความคิดเห็น • 52

  • @zahrabatool5617
    @zahrabatool5617 3 ปีที่แล้ว +2

    Thanks, Brain. You are doing an awesome job for the Power Portal community. kudos!

  • @kolaadebayo1
    @kolaadebayo1 3 ปีที่แล้ว +4

    Hi Brian! Thanks for the great work you do with your videos. I see you use jQuery functions in the code, this implies jQuery is supported natively in Power Apps Portals. Is that a correct understanding/assumption?

  • @AmeerHamza-zr4nn
    @AmeerHamza-zr4nn 2 ปีที่แล้ว +1

    Hey Brian! Great Work man. Really Appreciate it.

  • @mohamedaffi3816
    @mohamedaffi3816 ปีที่แล้ว

    Question: can you add a simple text in the form ? simple description text,? with javascript

  • @joshvince3701
    @joshvince3701 ปีที่แล้ว

    Hi Brian, thanks a lot for this video, was very much what I was looking for! I'm now wondering if there is a way to clear the field value if it is then hidden again? In this example, if I
    1) select other
    2) type some text in the newly available field
    3) select a different option
    The result is that whatever I wrote in the 'other' field still gets saved. I anticipate that later down the line I might want to use this technique with different types of fields and also do some sort of conditional logic which might be confused if there is some indecision when the user fills in the form.

  • @ileanaxxv
    @ileanaxxv 3 ปีที่แล้ว

    Hello Brian! This video helps me a lot! Thank you! But I still have a question... what if I need to mark this field/column as a required too?

  • @stefanpfadt4353
    @stefanpfadt4353 2 ปีที่แล้ว

    Awesome!
    Can I hide fields based on Wordpress user role?
    I have a search form and want to hide fields depending on what role the user has.

  • @Gamers-yv2dn
    @Gamers-yv2dn 2 ปีที่แล้ว

    Thanks Brian! One quick question, looks like the following example does not seems to work for choice fields with multiselect enabled. Tried several ways to bind change event, it does not work. Do you have an idea ?

    • @kobiwonkenobi
      @kobiwonkenobi 10 หลายเดือนก่อน

      Hi, did you ever find a solution for this?

  • @Deepakbadoni1274
    @Deepakbadoni1274 3 ปีที่แล้ว

    hey Brian! I want to ask one query i want if i select yes in radio button then field is show other wise hide

  • @gatskopsoftware8357
    @gatskopsoftware8357 ปีที่แล้ว

    Hi Brian! how can I move the attachment control at the bottom to somewhere else of the power page

    • @PragmaticWorks
      @PragmaticWorks  ปีที่แล้ว +1

      Unfortunately, to move this, you'd have to venture outside the realm of standard forms and potentially use Liquid. Another option is to use a File Data type, which is now supported. You could put that wherever you want on the form.

  • @trivenichaganti3403
    @trivenichaganti3403 3 ปีที่แล้ว +1

    @Pragmatic Works how can we hide/show tabs or sections in portal using Entity/webform

  • @mariusz9374
    @mariusz9374 ปีที่แล้ว

    I wonder whether we still need to use javascript in Portal Management to show/hide form fields on pages or is there a better way of doing this in Power Pages ?

    • @PragmaticWorks
      @PragmaticWorks  ปีที่แล้ว

      Nothing better yet but hopefully we eventually get business rules there (no word there yet on this from MS).

  • @juanc.villegas9111
    @juanc.villegas9111 ปีที่แล้ว

    Thank you for this. I've been trying to extract the value as you are but from a lookup and I almost lost my mind. It seems to be done more easily using a dropdown instead.

  • @user-ri7fo6tp5e
    @user-ri7fo6tp5e 3 ปีที่แล้ว

    Hey Brian! Watched all your portal videos a few times. Great stuff!! I was wondering where would I put bigger JavaScript code snippets, or could I place it all on the relevant webform step

    • @PragmaticWorks
      @PragmaticWorks  3 ปีที่แล้ว

      Exactly, it would all have to go there or in the page itself for larger examples.

  • @BGivo
    @BGivo ปีที่แล้ว

    Would it be possible to fire off some JS calls to an external API there to get some data?

  • @arslanarif3403
    @arslanarif3403 2 ปีที่แล้ว

    Hey Brian! excellent video and very helpful for a number of our requirements. Have you had any experience with showing or hiding a section on a form? we have a requirment where we want to hide one or more sections based on the dropdown choice the customer makes? Regards

    • @macavamedia5746
      @macavamedia5746 2 ปีที่แล้ว

      I would also like to know how to hide/show sections based on a multiselect drop down or a checkbox. I cannot find anything anywhere on how to do this. Thanks

  • @andrewdowning5687
    @andrewdowning5687 ปีที่แล้ว

    Brian - Thanks for creating this video. Very helpful. I've noticed the 'onDisplaySectionChange' alert only works on initial load. Changing values does not produce an alert. Any ideas?

    • @andrewdowning5687
      @andrewdowning5687 ปีที่แล้ว

      I figured it out! You have to use the 'logical name' which should be all lower case. In your video you show the 'schema name' column which is slightly different.

    • @PragmaticWorks
      @PragmaticWorks  ปีที่แล้ว

      Yes, you're correct! Great job there.

  • @anthonyleduc
    @anthonyleduc ปีที่แล้ว

    Hi, It's working for a dropdown filed but not if the source fied is a radio-button choice. Very strange

  • @sheezahafeez6202
    @sheezahafeez6202 2 ปีที่แล้ว

    Please add more videos on Power Web pages , where we can filter another entity list based on item selection in 1st entity list

  • @HyderabadiEmraan
    @HyderabadiEmraan ปีที่แล้ว

    how to read the hidden fields value, the value is undefined when i call any hidden fields from javascript.

  • @AdiCristea
    @AdiCristea 3 ปีที่แล้ว

    Thanks, Brian, so much flexibility using JavaScript. One question though, for those unfamiliar with JavaScript: showing/hiding fields couldn't be done with a Business Rule on the Entity (yeah, Table) used in your Form?

    • @PragmaticWorks
      @PragmaticWorks  3 ปีที่แล้ว +1

      Unfortunately not yet. Business rules won't apply to Portals applications. This might come at a later date but good grief, that would make things so much easier!

    • @AdiCristea
      @AdiCristea 3 ปีที่แล้ว

      @@PragmaticWorks Thank you for replying. In this case, there goes out of the window the "with Dataverse you can set your Business Rules on the Entity level and it's being cascaded down to all apps that are using that Entity".

    • @PragmaticWorks
      @PragmaticWorks  3 ปีที่แล้ว +1

      @@AdiCristea LOL. I'm sure it's coming but not yet.

  • @Emanuel-fu4cf
    @Emanuel-fu4cf 3 ปีที่แล้ว

    This is awesome, do you have any suggestions if I want to hide the "Edit" button based on the "Status" column for each record on a view? Thanks in advance!

    • @HyderabadiEmraan
      @HyderabadiEmraan ปีที่แล้ว

      Yes i added the liquid code in Edit button, let me know if you need any more - i know its a late to comment on it but it is for reference to other user, thanks

  • @Arsalkhan433
    @Arsalkhan433 3 ปีที่แล้ว +1

    Nice

  • @octaviusrice4674
    @octaviusrice4674 3 ปีที่แล้ว

    trying to come up with a way for us power app for car rider dismissal at my school is that something that you can do a video on to help me with?

  • @victoriafonseca7979
    @victoriafonseca7979 ปีที่แล้ว

    Como puedo descargar y trabajar sobre ese formulario?

  • @ronykhati2342
    @ronykhati2342 3 ปีที่แล้ว

    Thanks Brian. I'm creating a power app portal site for my company and am a little disappointed with the documentation to name just one thing. I've been trying for the past 2 days to find the header part of the index.html file but not sure where it is. I'm looking to see something like this so I can insert fontawesome and bootstrap scripts in it... any clue ?

    • @Anonymous-md6xd
      @Anonymous-md6xd 2 ปีที่แล้ว

      th-cam.com/video/2y0uqEagLpE/w-d-xo.html

  • @chrishagen9014
    @chrishagen9014 3 ปีที่แล้ว

    Hi Guys any tips on how to do exactly the same thing with a lookup field ?

  • @scottjames4461
    @scottjames4461 2 ปีที่แล้ว

    Hi Brian. Hope you can help. I've copied what you've done, in Power Pages but I just cant get Javascript to work. Even simply hiding a field on a form I can't get working and I've copied from your tutorial. It's like it doesn't run the Javascript and thinks its just text maybe. IS there some other setting? This is an advanced form and the 'cd12_PowerSupplyType' is a column name in my table. I'm going to post in the forums, but thought I'd try here.
    $( document ).ready(function() {
    $("#cd12_PowerSupplyType").change(onDisplaySectionChange);
    onDisplaySectionChange();
    });
    function onDisplaySectionChange() {
    var varWST = $('#cd12_PowerSupplyType').val()
    alert(varWST)
    }

    • @scottjames4461
      @scottjames4461 2 ปีที่แล้ว

      OMG I got it to work! Incorrect case I think. Fresh eyes on a different day :)

    • @PragmaticWorks
      @PragmaticWorks  2 ปีที่แล้ว +1

      I wish I can say I haven't done that but been there countless times.

    • @andrewdowning5687
      @andrewdowning5687 ปีที่แล้ว +1

      @@scottjames4461 You have to use the 'logical name' of the field which should be all lower case. I had the same issue.

  • @kmuralikrishna1582
    @kmuralikrishna1582 3 ปีที่แล้ว

    Hey really good..
    Do you have any playlist for PowerApp portal apps from scratch..?

    • @PragmaticWorks
      @PragmaticWorks  3 ปีที่แล้ว

      Sure do. Check out our Learn Power Apps playlist on our channel.

  • @andrewwoo2902
    @andrewwoo2902 3 ปีที่แล้ว

    Hi Brian,
    How tomodify the below code for this if my #prag_manufacture is a yes/no field (boolean)
    var varManuf = $('@/prag_manufacturer').find("option:selected").text();
    Thank you in advance

    • @birsingh1285
      @birsingh1285 2 ปีที่แล้ว

      Hi Andrew, are you able to figure out ,how to read the booleantype field ? Thanks

    • @andrewwoo2902
      @andrewwoo2902 2 ปีที่แล้ว

      @@birsingh1285 not able and i have give up

    • @josegregoriodiazvasquez1871
      @josegregoriodiazvasquez1871 ปีที่แล้ว

      Did you find a way to do it? I would like to do the same :) and it seems that Brian is not answering also.