Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Unanswered

conditional mandatory dropdown selection

Like (0) ShareShare
ReportReport
Posted on 14 Jan 2025 19:02:18 by 123
Hi everyone,
 

I have an App.
It is a checklist and if something is false, user should set the toggle to false AND should specify what is the issue in a dropdown with predefined options. The dropdown, as default is empty.
This same dropdown disappears when the toggle is true.

I want my "Next" Button (upper right corner) should only be available when any FALSE toggle has a selected item in its respective dropdown.
I tried some nested "ifs" and switches but could not make it work..
 

Does anyone have any suggestions?

Thank you in advance!
 
  • Lino Profile Picture
    Lino 123 on 15 Jan 2025 at 12:46:43
    conditional mandatory dropdown selection
    Hello, @danappwiz

    No, the the items are not in a gallery.
    I tried your second suggesting but it ends up in the same error i had at start:
     
    I tried it only with 2 toggle and 2 dropdowns.

    As you can see in the picture, this scenario should not show the next button.
    FYI: in the Onchange property of each toggle i have a Reset(dropdown) comand to erase the dropdown selection.

     
     
  • danappwiz Profile Picture
    danappwiz 2 on 14 Jan 2025 at 19:46:14
    conditional mandatory dropdown selection
    If your checklist items are in a gallery you can use the following on the OnVisible property of the "Next" button : 
    If(
        CountRows(
            Filter(
                galleryName.AllItems,
                toggleName.Checked = false && !IsBlank(dropdownName.Selected)
            )
        ) > 0,
        true,
        false
    )
    If they are separate components then you would need a more complex formula on the OnVisible instead :
     
    If(
        Or(
            And(toggle1Name.Checked = false, !IsBlank(dropdown1Name.Selected)),
            And(toggle2Name.Checked = false, !IsBlank(dropdown2Name.Selected)),
            ...
        ),
        true,
        false
    )
     
     

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,638

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,433

Leaderboard
Loading started