cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to save particular fields of collection using Patch

Hi,

 

My data source is SharePoint.

 

Columns in data source Questions:

1. Title: Default field

2. IsActive: Yes/No

3. QuestionNumber: Number

 

Columns in data source Feedback:

1. * Question: Lookup of Questions list

2. * Rating: Number

 

I have created collection of two data source on OnVisible of first screen as follow:

Following is not working:

ClearCollect(FeedbackTemp,FirstN(Feedback,100),FirstN(Questions,100));

Following is working:

ClearCollect(FeedbackTemp,FirstN(Feedback,100));

 

Now on button click I'm adding new items in collection by following code:

Collect(FeedbackTemp,{Rating:Value(Rating2.Value), Question:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:Value(lblQuestionId.Text),
                        Value:lblQuestion.Text},Title:lblQuestion.

Now when I'm trying to patch the collection, it gives me an error:

Patch(Feedback,FeedbackTemp);

Error: 

Invalid argument type (Table). Expecting record value instead. The function Patch has some invalid arguments.

 

Now when I'm only adding datasource "Feedback", then same code is working with patch (as I have marked working and not working above). I want to save only thos fields which are marked as *.

 

Please guid me what wrong I did?

 

Thanks 

1 REPLY 1
Highlighted
Helper V
Helper V

Re: How to save particular fields of collection using Patch

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,807)