cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skeepee
Regular Visitor

drop down connected to multi-value SharePoint list column does not clear if choices are cleared

I am using Power Apps to make a multi-screen form for a SharePoint list. This form is quite long, and the user's path through the form depends on their responses to questions.

 

I am having difficulty with a question that is mapped to a SharePoint multi-value choice column and represented in the app with a drop down control.

 

The desired behavior is:

  • The Next button on the screen is disabled until the user selects one of the question's choices or ticks a "None of these apply" checkbox.
  • If the user selects at least one choice in the question, the Next button is enabled and leads to screen B.
  • If the user checks "None of these apply", the Next button is enabled and proceeds to screen C.
  • If the user does both (makes a choice and checks "None of these apply"), the Next button leads to screen B.

I am using the IsBlank function to evaluate if anything in the choice box is selected. This works as expected if the user never selects any of the question's choices. However, if the user selects some of the choices and later clears them all, IsBlank continues to evaluate as false. In other words, the user cannot get to screen C if they respond to the question, even if they remove their responses and then check "None of these apply".

 

Is this a bug with the drop down control? Is there a method I can use to "reset" the question so that IsBlank evaluates as true?

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User II
Super User II

Hi @skeepee ,

 

In my opinion, there is a bad user experience if the user have the opportunity to check at least one answer from combobox and also check "None of above" answer. So, first of all let's assure that the user doesn't have this option:

1. CheckBox -> OnCheck:

    Reset(ComboBox) (i'm pretty sure that dropdown control is in fact combobox one)

    CheckBox -> DisplayMode:

    If(

      CountRows(ComboBox1.SelectedItems)=0,

      Edit,

      Disabled

    )

2. ComboBox -> DisplayMode:

    If(Checkbox1.Value,Disabled,Edit)

 

And now let's deal with the Next button:

3.  NextButton -> DisplayMode:

     If(

          CountRows(ComboBox1.SelectedItems)=0 && !CheckBox.Value,

          Disabled,

          Edit 

    ) 

    NextButton -> OnSelect:

     Navigate(

                  If(CheckBox.Value,[@'Screen C'],[@'Screen B')

     )

 

Hope it helps !

View solution in original post

6 REPLIES 6
indhaa
Post Prodigy
Post Prodigy

What is the code you are using?

skeepee
Regular Visitor

The OnSelect code for the Next button is:

 

 

If(IsBlank(DataCardValue),'Screen B','Screen C')

 

 

The checkbox is simply used as another way to enable the Next button. The Next button is enabled if the form is valid (the single required question is answered) or if "None of these apply" is checked.

I can work around it by making the destination of the Next button dependent on the checkbox rather than if the drop down control is empty or not:

If(chk_NoneApply.Value=false,'Screen B','Screen C')

 

However, this is not ideal because of the business situation. If the user makes a choice in that drop down then it is important that they answer some follow up questions. We really don't want to skip over that because they made a mistake and also clicked "None of these apply".

gabibalaban
Super User II
Super User II

Hi @skeepee ,

 

In my opinion, there is a bad user experience if the user have the opportunity to check at least one answer from combobox and also check "None of above" answer. So, first of all let's assure that the user doesn't have this option:

1. CheckBox -> OnCheck:

    Reset(ComboBox) (i'm pretty sure that dropdown control is in fact combobox one)

    CheckBox -> DisplayMode:

    If(

      CountRows(ComboBox1.SelectedItems)=0,

      Edit,

      Disabled

    )

2. ComboBox -> DisplayMode:

    If(Checkbox1.Value,Disabled,Edit)

 

And now let's deal with the Next button:

3.  NextButton -> DisplayMode:

     If(

          CountRows(ComboBox1.SelectedItems)=0 && !CheckBox.Value,

          Disabled,

          Edit 

    ) 

    NextButton -> OnSelect:

     Navigate(

                  If(CheckBox.Value,[@'Screen C'],[@'Screen B')

     )

 

Hope it helps !

View solution in original post

Thank you, @gabibalaban! I had brought my problem to a colleague and he suggested a similar approach - when either the drop down or the check box is used, use DisplayMode to disable the other control.

@gabibalaban Thanks for all your contributions to the forum. Your posts have helped a lot of users.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,141)