web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get Button displaymode...
Power Apps
Answered

Get Button displaymode edit, when 2 value is filled

(0) ShareShare
ReportReport
Posted on by 39

Dear Experts,

 

need some guidance here, please refer below picture,...

i want to make this NEXT button display mode edit if Label_1 filled, then check if TextInput has filled. Else it will disable.

is it possible ?

jm81klp_0-1692954742831.png

 

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @jm81klp,

     

    It seems that you are using the controls within a gallery. Would you like to disable the button if one ore more of the rows has no value in either control? The following will achieve this (change the control names to the correct names):

     

    If(
     CountIf(
     GalleryName.AllItems,
     IsBlank(Label_1.Text) || IsBlank(TextInput.Text)
     ) > 0,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • jm81klp Profile Picture
    39 on at

    Hi @LaurensM ,

     

    Yup, its work some how. But when its just capture on the first row only, and could not capture if second row got value or not. Let me try rephrase this again,...

    so at below here, first condition i need the overall weight can only be 50/60/70% only then, check if row 1 Weight have value or not, if have then must enter data until 2.0 then only the Submit button in Edit mode. If the first row total W was not either 50/60/70%, then user still able to enter at 2nd row, and this second row also need to have like same condition of row 1.

    jm81klp_0-1693189814666.png

     

    previously my formula like below,

     

    IF(Label1_1.text="Error%",DisplayMode.Disabled,

    IF(Label1_1.text="50%",DisplayMode.Edit,

    IF(Label1_1.text="60%",DisplayMode.Edit,

    IF(Label1_1.text="70%",DisplayMode.Edit,DisplayMode.Disable))))

     

    and now i try edit this, but my mind become blank already 😅

     

    If(
    CountIf(
    Gallery2.AllItems,
    IsBlank(TextInput1_31.Text) || IsBlank(TextInput1_34.Text),
    IsBlank(TextInput1_37.Text) || IsBlank(TextInput1_40.Text),
    IsBlank(TextInput1_43.Text) || IsBlank(TextInput1_46.Text),
    IsBlank(TextInput1_49.Text) || IsBlank(TextInput1_52.Text),
    IsBlank(TextInput1_55.Text) || IsBlank(TextInput1_58.Text)
    ) > 0,
    DisplayMode.Disabled,
    If(
    DisplayMode.Edit
    )

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @jm81klp,

     

    Thank you for the explanation! 

     

    I see that each row has their own unique TextInputs. Normally you would define 1 set of controls for each row that is then reused across all rows. Within this topic, let's first focus on how to define the DisplayMode of that button.

     

    Below you will find a code example that checks both the total percentage and checks whether there are any rows with a weighting defined and empty 0.0, 1.0 or 2.0 TextInputs:

     

    If(
     //If the label has either of the values below
     (Label1_1.text="50%" || Label1_1.text="60%" || Label1_1.text="70%") &&
     //And there are no rows that contain a weighting value and have a blank 0.0, 1.0 or 2.0 TextInput
     CountIf(
     Gallery2.AllItems,
     !IsBlank(WeightingLabelROW1.Text) && (IsBlank(TextInput0ROW1.Text) || IsBlank(TextInput1ROW1.Text)|| IsBlank(TextInput2ROW1.Text)),
     //Repeat for the other rows
     !IsBlank(WeightingLabelROW2.Text) && (IsBlank(TextInput0ROW2.Text) || IsBlank(TextInput1ROW2.Text)|| IsBlank(TextInput2ROW2.Text))
     ) = 0,
     //Allow submission
     DisplayMode.Edit,
     //In all other cases, disable the button
     DisplayMode.Disabled
    )

     

     

    What I would recommend in a later stage is to avoid using separate controls for each row and leverage the Gallery control to achieve this. You can then use collections to temporarily store the data and so on. There are a lot of great guides on YouTube that cover these topics.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • jm81klp Profile Picture
    39 on at

    Hi @LaurensM ,

     

    Yup, thanks for your advise,...
    this Works,.....

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard