cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Multi select combo box not patching Other text field value in Canvas app

Hi Team,

 

  I have Multi select Combo box in my canvas app, I have another Other field also when I select other in Multi select combo box Other text box will appear, when I add some data in Other text box and save the form it will saves other text value it is not patching values which I selected in the combo box.

 

 I used below code for that in the Combo box update.

"If(Otherbox.Visible = false, comboBox.SelectedItems, If(!IsBlank(Otherbox.Text), { Value: Otherbox.Text }, Blank()))"

 

It save other box text value when I add data in other box, I tried to used patch method to add both values in the SharePoint list it is Showing error.

 
 

 "The type this argument " " does not match the expected type Table, Found type record"

 

If(Otherbox.Visible = false, comboBox.SelectedItems, If(!IsBlank(Otherbox.Text), ForAll(comboBox.SelectedItems, Patch(SPlist, Defaults(SPlist), { Comboxfield: { Value: Otherbox.Text }})), Blank()))

 

 

I need to Save Selected Items and Other text value also in the Comboxfield.

 

Any thoughts ?

 

Thanks in Advance..

 

3 REPLIES 3
Highlighted
Resident Rockstar
Resident Rockstar

Hi @BadesabShaik ,

if you trying to patch the choice column or Lookup column in SP.

then you have to Patch the data in the COrrect Format.
See the below Code Choices Column then you can use like below Code - 

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

See the below Code you are patching the data to lookup column then you can use like below code- 

'Project Name':{
            Id:ProjectID,
            Value: Project,
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
        }


Thanks,
Vijay

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

Highlighted

Thanks for the suggestion but still I am getting same error.

 

I just want to add other text box value to Multi select drop down, when I save data either it is saving Data from multi select drop down or other text box data. I want to save both at a time in single SharePoint list column.

Highlighted

Finally I got the solution, we can use collect to resolve this issue.

 

Clearcollect(Collectionname, Dropdown.selectedItems, Value{ Otherbox.text });

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 (11,878)