cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

ClearCollect a choice field?

I was following along with @Shanescows videos on making Repeating Tables in PowerApps and I've kinda stumped myself. Here's the video: https://www.youtube.com/watch?v=xgznk4XlPCo

 

My problem is I deviated from the example provided and I'm not positive how to do so correctly. One of the fields is a drop down. On my button I have the following: 

NewForm(Form3);ClearCollect(SiteVisitCollection, {StateCMSSurveyDate: "", SurveyOutcome: "", SiteVisitandType: ""}); Navigate(Screen1, ScreenTransition.Cover)

SurveyOutcome is the drop down used on Screen1. 

 

The OnSelect of my save button is giving me an error and I don't think it likes how I have SurveyOutcome listed.

 

Here's my save button "OneSelect":

Patch(SiteVisitCollection, ThisItem, {Title:"Title", StateCMSSurveyDate: Value(SurveyDatePicker.SelectedDate), SurveyOutcome: SurveyOutcomeDropdown.Selected}); Collect(SiteVisitCollection, {StateCMSSurveyDate: "", SurveyOutcome: ""})

The error I get when hovering over it is 

The type of this argument "SurveyOutcome" does not match the expected type "text". Found type"Record".
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Responsive Resident
Responsive Resident

Re: ClearCollect a choice field?

Hi @notj ,

 

I hope you have bound SiteVisitCollection to your dropdown.

 

In the patch formulae change it to below

 

Patch(SiteVisitCollection, ThisItem, {Title:"Title", StateCMSSurveyDate: Value(SurveyDatePicker.SelectedDate), SurveyOutcome: SurveyOutcomeDropdown.Selected.SurveyOutcome});

If you just mention SurveyOutcomeDropdown.selected then you are trying to bind a selected record to field SurveyOutcome (which is wrong). You should give the surveyoutcome value to the corresponding field. You can get the particular field value from SurveyOutcomeDropdown.Selected.SurveyOutcome

 

 

if this answers your question mark it as verified and give thumbsup

Regards,

Pavan Kumar Garlapati

 

View solution in original post

Highlighted
Responsive Resident
Responsive Resident

Re: ClearCollect a choice field?

@notj ,

 

That's right. If you bind collection with multiple columns to the dropdown then you need to select the partcular column value of the selected record. i.e. dropdown.selected.selectedcolumn.

 

if you bind only one column collection to the dropdown then you can directly use dropdown.selected.value.

 

if this answers your question mark it as verified and give thumbsup

Regards,

Pavan Kumar Garlapati

View solution in original post

3 REPLIES 3
Highlighted
Responsive Resident
Responsive Resident

Re: ClearCollect a choice field?

Hi @notj ,

 

I hope you have bound SiteVisitCollection to your dropdown.

 

In the patch formulae change it to below

 

Patch(SiteVisitCollection, ThisItem, {Title:"Title", StateCMSSurveyDate: Value(SurveyDatePicker.SelectedDate), SurveyOutcome: SurveyOutcomeDropdown.Selected.SurveyOutcome});

If you just mention SurveyOutcomeDropdown.selected then you are trying to bind a selected record to field SurveyOutcome (which is wrong). You should give the surveyoutcome value to the corresponding field. You can get the particular field value from SurveyOutcomeDropdown.Selected.SurveyOutcome

 

 

if this answers your question mark it as verified and give thumbsup

Regards,

Pavan Kumar Garlapati

 

View solution in original post

Highlighted
Post Patron
Post Patron

Re: ClearCollect a choice field?

So I did SurveyOutcomeDropdown.Selected.Value and it seems to be working so far. Is that the same as doing SurveyOutcomeDropdown.Selected.SurveyOutcome?

 

Highlighted
Responsive Resident
Responsive Resident

Re: ClearCollect a choice field?

@notj ,

 

That's right. If you bind collection with multiple columns to the dropdown then you need to select the partcular column value of the selected record. i.e. dropdown.selected.selectedcolumn.

 

if you bind only one column collection to the dropdown then you can directly use dropdown.selected.value.

 

if this answers your question mark it as verified and give thumbsup

Regards,

Pavan Kumar Garlapati

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,740)