cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cnorris135
Helper IV
Helper IV

Always submits FIRST item in dropdown

Hi

 

I have an issue with a dropdown always submitting the FIRST item in the dropdown even though it populates with the correct code.... the code for the dropdown references a list for populating it.  It is

 

Distinct(Filter('SP List', Site = Datacardvalue4.selected.value),Description).

 

Here are some screenshots which shows in the form what is selected vs the list it references.  when the form is submitted, it always submits the first one in the dropdown even though the description box populates with the selection.   I selected "Serious Injuries" and when i clicked the submit button, it submitted the "Forecast Expense"..... What am i doing wrong here?  What do i need to change in my code?

 

Form

KPI 1.JPG

 

Reference List

KPI 2.JPG

2 ACCEPTED SOLUTIONS

Accepted Solutions

@cnorris135 

If you put the original formula you had in the Update, does the problem go away?  Making sure that something else hasn't been changed.  Does it mention which column is required that is not being supplied?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

thank you sir for your kind help. it worked!

View solution in original post

11 REPLIES 11
VDS_Mantra
Resolver I
Resolver I

Hi, 

 

Kindly check again as it is submitting correct entry in KPI 9 as serious injury as given in below snapshot. 

 

RandyHayes
Super User
Super User

@cnorris135 

The question is going to be with your Update property formula for the KPI_Description dataCard.

What is that formula?  And, what kind of a column is KPI_Description as defined in your data source (I'm assuming SharePoint), a Text column or a Choice column?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I selected the KPI_Description_Datacard1 and looked at the Update property and it said = "DatacardValue2".  I did notice that per that field in the card, its named DataCardValue2. 

the KPI_Description formula is set on Items 

 

Items = Distinct(Filter('SP list', Site = DataCardValue4.Selected.Value),Description)

 

as you can see in the form, it works correctly.  It populates the Description box correctly.  The problem is when it is submitted.  It submits the first item (Forecast) instead of the (Serious Injuries).  Even the KPI # works correctly.  I also attached the list screenshot to show what the KPI #, Site, Description.  I selected Serious Injury and the KP # = 9.  

 

INCORRECT
Once i click the submit, it submits KPI Description - Forecast Expense, KPI # - 1

CORRECT

It should submit KPI Description - Serious Injury, KPI # 9.

something in my KPI Description formula is forcing the item to select the first item in the list vs what the dropdown i selected and shows...

@cnorris135 

So a few things:

1) You mentioned a screenshot, but there was none.

2) What kind of Column is KPI_Description in your datasource that you are trying to update? Is it a Text column, Lookup Column or Choice column?

3) Yes - your Update property is not correct, but I need to know the answer to #2 to suggest any correction.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

hi... sorry for the late reply...

 

1.) see below for screenshot of the form, then the reference list...

 

2.) it is a choice field in SP with actual choices..but it references the second screenie below reference list per the code.  i would have thought that it would use the formula, vs the choices of the of the field.  But they are actually the same choices with Forecast being the top choice.

 

3.) 

 

KPI 1.JPGKPI 2.JPG

@cnorris135 

So your issue is with the Update property of your KPI_Description datacard.

Since you are submitting to a Choice column, the formula you stated for Update is not going to do anything.

 

What you should have in your Update Property on that datacard is:

 {
    Value: DataCardValue2.Selected.Result,
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
}

This is assuming the dropdown that has the actual KPI_Description in it is called DataCardValue2.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

sir... thank you for responding... 

FYI.. here is the screenshot of the Datacard

KPI 3.JPG

@cnorris135 

Yep...so then the formula I supplied for your Update property on that DataCard should do the trick.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

for whatever reason, it is throwing a "Required Info" error for that field now.  i copied and pasted that code for UPDATE on the datacard........  not sure what is going on....

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,029)