Custom Validations in Power Apps Modern Forms | Tutorial

Поделиться
HTML-код
  • Опубликовано: 8 янв 2025

Комментарии • 83

  • @ricjrob
    @ricjrob 15 дней назад +1

    Another Save from Reza. Found the modern form control experience really frustrating until now. Thank you

  • @mannymorales7913
    @mannymorales7913 2 месяца назад +1

    Reza - thanks again for some great techniques to help build refined forms in PowerApps in a simple, scalable manner. Great video!

  • @dougydoe
    @dougydoe 4 месяца назад +1

    Great video with a number of tips and tricks to get used to. Thanks for sharing as always. Appreciated.

  • @shaikhabdulrahman3469
    @shaikhabdulrahman3469 4 месяца назад +2

    Your videos are very helpfull Reza.
    Thanks for sharing.

  • @spen2431
    @spen2431 4 месяца назад

    Nice one - Thanks for sharing. I use the "Trigger Output" / "Delayed" instead of a timer but just goes to show there are so many ways to approach these problems. Always pick up something new from your videos ! 💡💡💡💡💡💡

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      Most welcome!
      Trigger output on button?

    • @spen2431
      @spen2431 4 месяца назад

      @@RezaDorrani On the Modern Text boxes.

    • @RezaDorrani
      @RezaDorrani  4 месяца назад +1

      @@spen2431 Yes, but my timer is on button click after all validations play out. Not all the controls are text inputs.

  • @paolovr1970
    @paolovr1970 2 месяца назад +1

    Thanks Renza Amazing

  • @oluwatobiyusuf
    @oluwatobiyusuf 3 месяца назад +1

    Thank you Reza

  • @DaHooka
    @DaHooka 4 месяца назад +1

    Love those videos

  • @Tango_01
    @Tango_01 4 месяца назад +1

    Hi Reza,Thank you so much for all that you offer. I need some assistance-do you have any videos or materials related to electronic signatures? I need users to sign an agreement.

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      Most welcome!
      I don’t have any videos related to electronic signatures. I will recommend checking on forums in case someone has done something similar powerusers.microsoft.com

  • @mtamitolanga
    @mtamitolanga 4 месяца назад +1

    Great video, that looks simplified using properties. Could you share a video of a lookup column in Dataverse with many-to-many relationship in a canvas app. With model-driven its quite simply because the junction table is created automatically. Is there a way to patch my lookup column without physically creating a junction table? Thank you very much 👍🏾

    • @RezaDorrani
      @RezaDorrani  4 месяца назад +1

      Most welcome!
      I have not tried with a many:many relationships. A video idea for this is good but I am working on many other video topics in my backlog. I would recommend checking on forums in case someone has done something similar powerusers.microsoft.com/

  • @clausdev85
    @clausdev85 4 месяца назад

    Hi Reza,
    Please correct me if I’m wrong, but I think that setting the ‘Required’ property on the Datacard ‘Priority_DataCard1’ to true can achieve the same effect as shown at 9:10

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      Not quite, as I have built my own custom navigation on button click. I am not submitting the form on button click.

  • @vitorsaess
    @vitorsaess 4 месяца назад +1

    Hi Reza, thanks a lot for the video!
    Let me ask you, I'm working with a patch function on a form and since my columns on Dataverse are not set to required, because it depends on the value of a dropdown that I store in a variable, I'd like to know if it's possible to do this validations aswell?

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      Possible but not something I have tried or have a video reference for

  • @marcelbiedermann87
    @marcelbiedermann87 3 месяца назад

    Hi Reza, amazing video! When I open the dateValue field and search in “advanced” properties I cannot find Start & EndDate?! I only have “EndYear”. Any hint why? Thanks!

    • @RezaDorrani
      @RezaDorrani  3 месяца назад

      Because our data sources are probably different. Its a guess.

  • @АлексейКолокольцев-ы1я
    @АлексейКолокольцев-ы1я 4 месяца назад +1

    I was waiting for this topic :)
    Please tell me, how can I make a Validation for a text field so that users enter only digitals, not text?

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      My older validation video covered it, hence did not repeat.
      Use the IsMatch function learn.microsoft.com/en-us/power-platform/power-fx/reference/function-ismatch

    • @spen2431
      @spen2431 4 месяца назад

      @@RezaDorrani or replace the text control with the new Number Control.

    • @avishay83
      @avishay83 4 месяца назад

      Thanks Raza, great as always.
      Can you elaborate more for why you had the need to the delay?
      Is it because you wanted to give the app time to calculate all the validation states? Otherwise it could not complete before the next function that submits the form? If yes, kinda of a potential issue for many things no? I always assumed there is a logic that constraint the execution of one function to be after the previous function (and it's dependencies) finish.

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      @@avishay83 Its because I am building custom validations. That button click triggers setting the variable which in turn triggers the validation states. Hence the short delay.
      If you use the standard validation options, then it runs on button submit.

  • @Ramosnafos
    @Ramosnafos 3 месяца назад

    Hi
    when you will start providing same tips for power pages ?

    • @RezaDorrani
      @RezaDorrani  3 месяца назад

      When I start deep diving in pages

  • @panchomxx
    @panchomxx 4 месяца назад

    Hi Reza, very nice video. You didn't covered text fields for number validations (you already did it in a different video).
    One question, what's the main purpose of delaying the Submit action with a Timer? Is there any known issue?

    • @RezaDorrani
      @RezaDorrani  4 месяца назад +2

      Because I had done it in a different video :)
      Reason is because, since onclick of button, I first set that variable to trigger the validation checks, it can happen that it takes a few secs to trigger and hence the delay.

  • @stevenned23
    @stevenned23 3 месяца назад

    Thanks Reza. Grat and very helpful video again!! I'm looking for a validation that when I made some changes /edit in my form and I leave for what reason without resetting it or submit it then I need a validation massage. The form is very big with more than 5 data cards. So, it is not effective to do this for each data card. Is there such a validation that looks to all datacards voor changes?

    • @RezaDorrani
      @RezaDorrani  3 месяца назад

      I’m not aware of a general technique that applies to all. I will recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com

  • @Vennex89
    @Vennex89 4 месяца назад +1

    Hey Reza, so I have personally had a lot of issues with bugs with the new form control and many modern controls, specifically around holding on to values when switching records in a gallery. I had to set my combobox default to a fake string value of "" when nothing was selected in order for the visible property of another field to work correctly. I guess what I'm asking is, can you make a video talking through any weird issues you've found that will hopefully be fixed and ways to work around them?

    • @RezaDorrani
      @RezaDorrani  4 месяца назад +1

      If you check the solution file shared for members, you will see the fixes implemented.

    • @ambarish360
      @ambarish360 4 месяца назад +1

      ​@@RezaDorrani, similar issue I was also facing, one good example is in Classic text control the use Len function to calculate the length of the string it automatically updates as user type in, but in modern control you will have to explicitly click outside to see the effect, which I also noticed in this video for issue title value len greater than 5, any workaround??

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      @@ambarish360 Yes, the modern text box has a property for trigger output. Check that option.

    • @RezaDorrani
      @RezaDorrani  3 месяца назад +2

      @@GarconeRJ Modern controls have a feedback option in studio. Thats the best place to give feedback and help improve the product. Calling something out as not good does not add much value. Sharing feedback about why they dont work is important.

    • @RezaDorrani
      @RezaDorrani  3 месяца назад +1

      @@GarconeRJ I dont take that call :)
      Best to post that feedback in the product.

  • @cristianvalencia4327
    @cristianvalencia4327 4 месяца назад

    Hi Reza, For card data reported, I noticed the date has a validation,but what about time (hour and minutes fields) what's the best way to configure them

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      I have not explored working with time and hour in context of validations.

  • @alexandrubirsan7608
    @alexandrubirsan7608 4 месяца назад

    Hey Reza! Did the team fix the people picker? I see you have a working one. Thanks!

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      My data source is Not SharePoint. Check the video.

  • @PowerFx1
    @PowerFx1 4 месяца назад

    Did you put the timer delay because it takes some time for the formvalid assigned a value ?

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      Yes, variable set to true and then time for custom validations to kick in.

  • @Greg-p1w
    @Greg-p1w Месяц назад

    There is no "start date" condition for Date Picker, how did you get that?

    • @RezaDorrani
      @RezaDorrani  Месяц назад

      This is a modern form control (which is in preview)

  • @fahadasmat8178
    @fahadasmat8178 2 месяца назад

    Hi Reza, I'm doiumng the same logic however my form is not setting false on submit button. Im usingpeple picker classic combo box with time delay and a submit button with form valid formula, My formValid valus eis not cnaging to false at all when using with time delay. It works fine when use the logic on submit button direct.

    • @RezaDorrani
      @RezaDorrani  2 месяца назад +1

      I'm not sure why that would be the case. The entire solution is available for members in gold or silver tier to download.

    • @fahadasmat8178
      @fahadasmat8178 2 месяца назад +1

      @ Thanks. Im able to fix now by updating the update field on people picker classic combo box and then use submitform().

  • @fahadasmat8178
    @fahadasmat8178 2 месяца назад

    Hi Reza, I found now this validation only works if i use submit form(). On patch its not working at all. Is there any way to update the people picker classic combo box values to sharepoint on the same submit form()? Im using two timer delays one for to patch a big form and other to just update the classic combo box for people picker as modern combo box not works as expected.

    • @RezaDorrani
      @RezaDorrani  2 месяца назад

      This video does not show patch function as far as I remember. Im not sure what you are trying with multiple timers. I would have to recreate your scenario + reproduce your issue to know the options.
      I will recommend posting your issue on forums
      community.powerplatform.com/

    • @RezaDorrani
      @RezaDorrani  Месяц назад

      This video was specific to forms. I'm not sure about patch function.

  • @walberrr
    @walberrr 4 месяца назад

    hello reza, Is it a good idea to use modern controls in the production apps ?

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      I have many customers who are using it in production scenarios. There are some limitations with it. As long as you can work with them, then Yes.

    • @walberrr
      @walberrr 4 месяца назад

      ​@@RezaDorrani Is it possible for you to make a video on "With" function and explaining a scenario where you filter out one collection from other using it.

    • @RezaDorrani
      @RezaDorrani  4 месяца назад +1

      @@walberrr I make videos when I receive multiple requests on a topic. Every 6 months I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.

    • @walberrr
      @walberrr 4 месяца назад +1

      ​@@RezaDorrani Sounds good

  • @shrishailpatil8619
    @shrishailpatil8619 2 месяца назад

    How to give * as a mandatory field in frantt of issue... Which video should i watch.. I have custom form i want put * as mandatory field in frant of name

    • @RezaDorrani
      @RezaDorrani  2 месяца назад

      I do not have a specific video reference on that.

    • @shrishailpatil8619
      @shrishailpatil8619 2 месяца назад +1

      ​@@RezaDorranithank you

  • @jonny99999
    @jonny99999 21 день назад

    I am not seeing ValidationState listed as a property on any of my DataCardValue controls. Does anyone know what I might be doing wrong? Is it possible that my organization is on a different version of Power Apps? Thanks in advance

    • @RezaDorrani
      @RezaDorrani  21 день назад

      You need to use the Modern Form Control.

  • @liveondeendieondeen1704
    @liveondeendieondeen1704 3 месяца назад

    code given for priority box and multi select combo is not working can u pls help

    • @RezaDorrani
      @RezaDorrani  3 месяца назад

      Video description has link to download entire solution (members only - check description for details)
      I would suggest giving that a try.
      As for the issue mentioned, I have not experienced it and hence not sure what the cause for it could be.
      I will recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com

  • @avishay83
    @avishay83 4 месяца назад

    Hi Reza, I saw you replied to me but I can't see the reply.
    I asked about what was the need for the timer and if it means that just putting functions in the right order is not enough in order for everything to work as it should (as in each function will start it's logic only after the previous one and whatever it affects downstream will finish)

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      Resharing my response here “Its because I am building custom validations. That button click triggers setting the variable which in turn triggers the validation states. Hence the short delay.
      If you use the standard validation options, then it runs on button submit.”

    • @avishay83
      @avishay83 4 месяца назад

      @@RezaDorrani but what would have happened if you wouldn't use this delay? The logic to submit the form would not be accurate because the validations would not complete before the logic of the submit?

    • @RezaDorrani
      @RezaDorrani  4 месяца назад

      @@avishay83 Yes. You can try removing the delay and test.

    • @avishay83
      @avishay83 4 месяца назад

      @@RezaDorrani Ok thank you :) I think this topic is much bigger than just this use case. How to know (or at least have a sense) when to use a delay and when you don't have to. Maybe an idea for a video :))

    • @RezaDorrani
      @RezaDorrani  4 месяца назад +1

      @@avishay83 The answer is simple. I used custom validations wherein I set a variable on button click which in turn triggers validations. Hence I used a timer.
      All other scenarios do not need it.

  • @asmi3007
    @asmi3007 Месяц назад

    Hi Reza need a short video in maths calculation specifically if we have value in crores and turn it into Thousandor lakhs with currency.. for example I have total sales value as Rs. 15436985.678 and convert this value either to 1.5 cr or 154 lakh or 1543 thousands

    • @RezaDorrani
      @RezaDorrani  Месяц назад +1

      No plans for a video on this topic.
      Every 6 months I ask for topic suggestions on community tab of my channel. Make sure to post this idea there. If it gets max votes, I will add the topic to my backlog.

  • @umeshjyani7183
    @umeshjyani7183 3 месяца назад

    Can anyone please help with this?
    In a Modern Table, how can we have a different onSelect action for every column? My task is to show a column with a ticket ID that appears as a link. When the user clicks on it, I want to navigate them to another screen.
    If this cannot be done in a Modern Table, how can we add a separator in a Classic Table?

    • @RezaDorrani
      @RezaDorrani  3 месяца назад

      Modern table has an onselect function.
      There you can check to see the metadata of selected item and accordingly write your logic with if or switch statements.

  • @mialeksic
    @mialeksic 2 месяца назад

    ValidationState condition for the Title field is not valid.
    If(And(varFormSumbited, IsBlank(Self.Value), Len(Self.Value)

    • @RezaDorrani
      @RezaDorrani  2 месяца назад

      Probably got updated in later part of video. I do remember revisiting the title validation as part of the video.