cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Dropdown List Will Not Reset After Changing Choices

Hi, I am facing an issue where my previous choice for my dropdown list will get recorded even after I change my choice.

 

The users have to select the name of their assessor which will then show different dropdown lists based on their choices.

 

When they select assessor A, a dropdown list with "1, 2 and 3" will appear 

 

When they select assessor B, a dropdown list with "X, Y and Z" will appear

 

However, this is where the problem comes in. When the user selects assessor A --> 2 and then decide to change to assessor B --> X, when they submit the form, both 2 and X will be recorded in the SharePoint list. 

 

I have attached a picture of my SharePoint list to show the error.

 

Can anyone help me with this?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
egallis
Level 10

Re: Dropdown List Will Not Reset After Changing Choices

Hi @Anonymous,

Thank you for all the information you provided.

Forgot to ask you about the Visible property of these controls, but I guess that each Module dropdowns is visible only when the corresponding assessor is chosen. So I guess you put something like that (at least that's what I did when I reproduced your case):

  • ModuleP datacard Visible property: Find(DataCardValue10.Selected.Value,"LYB,JL,TCH")>0
  • Module1A datacard Visible property: Find(DataCardValue10.Selected.Value,"YSY,SZY,HCS")>0
  • Module1B datacard Visible property: Find(DataCardValue10.Selected.Value,"VTLD,RHW,SMZ")>0

So here is the solution to your problem...

What you need to do is to:

  • reset the content of ModuleP dropdown when Assessor is NOT "LYB" or "JL" or "TCH"
  • reset the content of Module1A dropdown when Assessor is NOT "YSY" or "SZY" or "HCS"
  • reset the content of Module1B dropdown when Assessor is NOT "VTLD" or "RHJW or "SMZ"

To do that, put the following code in each Module dropdown Reset property:

  • ModuleP dropdown Reset property: Not(Find(DataCardValue10.Selected.Value,"LYB,JL,TCH")>0)
  • Module1A dropdown Reset property: Not(Find(DataCardValue10.Selected.Value,"YSY,SZY,HCS")>0)
  • Module1B dropdown Reset property: Not(Find(DataCardValue10.Selected.Value,"VTLD,RHW,SMZ")>0)

VERY IMPORTANT: also make sure that each of your ModuleP, Module1A and Module1B columns in your list (if they are Choices columns), don't have any default value set:

Image 18.png

This should do the trick... Tell me if this works in your app (worked for me).

Emmanuel

9 REPLIES 9
Community Support Team
Community Support Team

Re: Dropdown List Will Not Reset After Changing Choices

Hi @Anonymous ,

 

Do you want to the DataSource to save your last choices?

Do you want to Dropdown1’s value is saved with AssesorA, and Dropdown2’s  value is saved with AssessorB?

You can try to change Dropdown’s Update to achieve your purpose.

 

I test as this:

Data Source:

20180218dropdownchoice(my sp list name)

Assessor(choice type)

D1(Choice type,value:1,2,3)

D2(Choice type,Value:x,y,z)

2090218dropdownchoicesp1.png

AppTest:

D1_DataCard5.Upate: If(DataCardValue19.Selected.Value="AssessorA",DataCardValue20.Selected,Blank())

D1_DataCard5.Visible: If(DataCardValue19.Selected.Value="AssessorA",true,false)

D2_DataCard5.Update: If(DataCardValue19.Selected.Value="AssessorB",DataCardValue21.Selected,Blank())

D2_DataCard5.Visible: If(DataCardValue19.Selected.Value="AssessorB",true,false)

20190218dropdownchoiceapptest1.jpg

Result Test:

20190218dropdownchoiceresulttest1.gif

20190218dropdownchoiceresulttest2.png

 

Hope this can be helpful.

Best Regards.

Yumia

Anonymous
Not applicable

Re: Dropdown List Will Not Reset After Changing Choices

Hi, I tried your method but I am still facing some error.

 

This is my code 

If(DataCardValue10.Selected.Value = "A" Or "B" Or "C", DataCardValue12.Selected,Blank(), DataCardValue13.Selected, Blank(), DataCardValue14.Selected, Blank(), DataCardValue15.Selected, Blank(), DataCardValue53.Selected, Blank())

When I select Assesor = "A" and select "1" then change to Assessor = "B" and select "X" and submit, my SharePoint list will save the results as "B" and "1". 

 

Can you please help me with this? 

 

Thank you!

Anonymous
Not applicable

Re: Dropdown List Will Not Reset After Changing Choices

And also I will receive an error that the field is not filled in when it is

 

PowerApps.JPG

Anonymous
Not applicable

Re: Dropdown List Will Not Reset After Changing Choices

Can anyone help me please? Thank you!

NigelP
Level 8

Re: Dropdown List Will Not Reset After Changing Choices

Hi @Anonymous 

 

Did you refresh the datasource of the drop down after you changed it ?

 

Regards

 

Nigel

egallis
Level 10

Re: Dropdown List Will Not Reset After Changing Choices

Hi @Anonymous,

I think you have to re-think the way you set some of your datacard properties (update, items, defaut, etc.).

In order for me help you, could you please give me the following properties values for your Assessor and Module datacards:

  • DataCard properties
    • DataField
    • Default
    • Update
  • DataCardValue properties (the combo box)
    • Items
    • Default
    • DefaultSelectedItems
    • Reset

Also, what is the name of your datasource (your SharePoint list) ?

Finally, could you be a bit more precise in the exact behavior your want between those two combo boxes ?

Thank you,

Emmanuel

Anonymous
Not applicable

Re: Dropdown List Will Not Reset After Changing Choices

Hi, sure

 

Name of Data Source: Defect Handling

 

Name of Assessor's Data Card Properties: 

DataField: "Name_x0020_of_x0020_Assessor_x00"

Default: ThisItem.'Name of Assessor:'

Update: DataCardValue10.Selected

 

Name of Assessor's Data Card Value Properties: 

Items: Choices('DMS Health Check Results (CL)'.'Name of Assessor:')

Default: Empty

Default Selected Items: Parent.Default

Reset: False

 

Module P's Data Card Properties: 

DataField: "Which_x0020_module_x0020_did_x00"

Default: ThisItem.'Which module did you take the test for? (PMD)'

Update: DataCardValue12.Selected

 

Module P's Data Card Value Properties: 

Items: Choices('DMS Health Check Results (CL)'.'Which module did you take the test for? (PMD)')

Default: Empty

Default Selected Items: Parent.Default

Reset: False

 

Module 1A's Data Card Properties: 

DataField: "Which_x0020_module_x0020_did_x000"

Default: ThisItem.'Which module did you take the test for? (SMD Cell 1 Line A)'

Update: DataCardValue13.Selected

 

Module 1A's Data Card Value Properties: 

Items: Choices('DMS Health Check Results (CL)'.'Which module did you take the test for? (SMD Cell 1 Line A)')

Default: Empty

Default Selected Items: Parent.Default

Reset: False

 

Module 1B's Data Card Properties: 

DataField: "Which_x0020_module_x0020_did_x001"

Default: ThisItem.'Which module did you take the test for? (SMD Cell 1 Line B)'

Update: DataCardValue14.Selected

 

Module 1B's Data Card Value Properties: 

Items: Choices('DMS Health Check Results (CL)'.'Which module did you take the test for? (SMD Cell 1 Line B)')

Default: Empty

Default Selected Items: Parent.Default

Reset: False

 

When the employees select "LYB" or "JL" or "TCH", Module P (X, Y, Z) will appear

 

When the employees select "YSY" or "SZY" or "HCS", Module 1A (1, 2, 3) will appear

 

When the employees select "VTLD" or "RHJW or "SMZ", Module 1B (Q, W, E) will appear and so on

 

However, I am facing a problem where if the employees select LYB under 'Name of Assessor' and select X under Module P and decide to change to another assessor such as "YSY" and select 1 under Module 1A, when the form is submitted, YSY, X and 1 will appear in my SharePoint list. 

 

Please help me with this as it is very important for my project.

 

Thank you!

Highlighted
egallis
Level 10

Re: Dropdown List Will Not Reset After Changing Choices

Hi @Anonymous,

Thank you for all the information you provided.

Forgot to ask you about the Visible property of these controls, but I guess that each Module dropdowns is visible only when the corresponding assessor is chosen. So I guess you put something like that (at least that's what I did when I reproduced your case):

  • ModuleP datacard Visible property: Find(DataCardValue10.Selected.Value,"LYB,JL,TCH")>0
  • Module1A datacard Visible property: Find(DataCardValue10.Selected.Value,"YSY,SZY,HCS")>0
  • Module1B datacard Visible property: Find(DataCardValue10.Selected.Value,"VTLD,RHW,SMZ")>0

So here is the solution to your problem...

What you need to do is to:

  • reset the content of ModuleP dropdown when Assessor is NOT "LYB" or "JL" or "TCH"
  • reset the content of Module1A dropdown when Assessor is NOT "YSY" or "SZY" or "HCS"
  • reset the content of Module1B dropdown when Assessor is NOT "VTLD" or "RHJW or "SMZ"

To do that, put the following code in each Module dropdown Reset property:

  • ModuleP dropdown Reset property: Not(Find(DataCardValue10.Selected.Value,"LYB,JL,TCH")>0)
  • Module1A dropdown Reset property: Not(Find(DataCardValue10.Selected.Value,"YSY,SZY,HCS")>0)
  • Module1B dropdown Reset property: Not(Find(DataCardValue10.Selected.Value,"VTLD,RHW,SMZ")>0)

VERY IMPORTANT: also make sure that each of your ModuleP, Module1A and Module1B columns in your list (if they are Choices columns), don't have any default value set:

Image 18.png

This should do the trick... Tell me if this works in your app (worked for me).

Emmanuel

Anonymous
Not applicable

Re: Dropdown List Will Not Reset After Changing Choices

Hi, thank you very much! That works perfectly. Heart

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 219 members 4,152 guests
Please welcome our newest community members: