Skip to main content
Community site session details

Community site session details

Session Id : bsBouNgtaVr2aUrcPgu/Rv
Power Apps - Building Power Apps
Answered

How to Keep Disabled the Submit Icon till DatacardValue is empty

Like (0) ShareShare
ReportReport
Posted on 8 Mar 2024 04:36:06 by

I am developing an app in Teams - power app.

Want to disable the submit button till the mandatory field is not filled.

 

Tried to control it via Dataverse table, by selecting Colum Required property to :  Business required.

But seems it has no effect, may be updated the property later

 

Therefore, trying to control it via, So if the field is not filled/Blank, the submit button will remain disabled.

 

Below is my code and error image on the screen, 

 If(
IsBlank(DataCardValue1.Value) || IsBlank(DataCardValue1.Value), DisplayMode = DisplayMode.Disabled, DisplayMode = DisplayMode.Edit)

 

MIA27_0-1709872370400.png

 

pls. guide correction

 

  • MIA27 Profile Picture
    on 08 Mar 2024 at 06:07:13
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    Thank you.

    Good learning for me today.

    Best Regards

  • Verified answer
    Kirkby Profile Picture
    647 Moderator on 08 Mar 2024 at 06:04:27
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    @MIA27 

    Sorry. It was a simple problem, but it took us a long time because of misunderstanding  . I hope you understand. 

     

     

    .Text  obtains value from both number format and text format. Number format is used for real-time validation during input.  

     

    Text â€“ Text that appears on a control or that the user types into a control.

    Value â€“ The value of an input control.

     Does ".value" of Text Input field work? 

  • MIA27 Profile Picture
    on 08 Mar 2024 at 05:52:32
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    Thank you for your support , at last it worked ... Oh.....

     

    Just for my learning, Its strange :

    The code accepts    .value for Text Format field

    The code accepts    .Text for number format field

    surprised, as it is opposite method acceptance.

     

    Any learning link or material to understand more on this, 

     

    Best regards

     

     

  • Verified answer
    Kirkby Profile Picture
    647 Moderator on 08 Mar 2024 at 05:47:56
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    If any one of the two is empty, it is disabled" - I misunderstood the condition

     please change "&&" to "||"

  • MIA27 Profile Picture
    on 08 Mar 2024 at 05:39:32
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    But the result is not perfect. please note my reply

    It bring the result for first condition only, for cardvalue5 it does get affected.

     

    pls. guide

     

  • Kirkby Profile Picture
    647 Moderator on 08 Mar 2024 at 05:37:47
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    Oh.. I didn't noticed Value was used instead of .Text.  Text is correct. 

  • MIA27 Profile Picture
    on 08 Mar 2024 at 05:31:26
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    sorry,

    Can not understand what mistake I am doing, applied the revised code (.value did not accepted was underlining red for error), so applied the below and no error lining but still not the perfect result.

    It gets applied for datacardvalue1 but dont get in effect if the datacardvalue5 is blank.

    Below is the image

     

    note: datacardvalue1 is a text field

    datacardvalue5 is a number field

     

    If(
    IsBlank(DataCardValue1.Value) && IsBlank(DataCardValue5.Text),
    DisplayMode.Disabled, DisplayMode.Edit)  
     
    MIA27_1-1709875810058.png

     

    Can notice field SvcSMR is blank, still the Tick mark Icon is enabled

     

    Please guide

     
     
     
     
     
  • Kirkby Profile Picture
    647 Moderator on 08 Mar 2024 at 05:06:43
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    the first condition and the second condition is same. please check...

     

    IsBlank(DataCardValue1.Value) && IsBlank(DataCardValue1.Value),

  • MIA27 Profile Picture
    on 08 Mar 2024 at 05:04:48
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty

    Thank you

    Applied the code, it accepted, no error underline now.

    BUT has no impact on the result.

    For test purpose, on the previous record, if removed the value from field and made it blank, found it has no impact on the Icon, It remained enabled. While the requirement is what ever the Form Mode be (Edit, View, New), If these 2 fields blank, it should be disabled,

     

    I dont know if I am approaching the requirement in the right way.

    Please guide

     

     

    ==================

     

    If(
    IsBlank(DataCardValue1.Value) && IsBlank(DataCardValue1.Value),
    DisplayMode.Disabled, DisplayMode.Edit)  
  • Verified answer
    Kirkby Profile Picture
    647 Moderator on 08 Mar 2024 at 04:54:35
    Re: How to Keep Disabled the Submit Icon till DatacardValue is empty
    If(
    IsBlank(DataCardValue1.Value) && "your second validation"
    DisplayMode.DisabledDisplayMode.Edit)   

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete