cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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

Responsive Resident
Responsive Resident

@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
Responsive Resident
Responsive Resident

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

Responsive Resident
Responsive Resident

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

 

Responsive Resident
Responsive Resident

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,479)