Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
catalin
Partner - Contributor III
Partner - Contributor III

QS .NET SDK - ApplyPatches error

Hello!

I am trying to remove and then to add some property for an object like in the excerpt bellow. The problem is I always receive the error: Invalid parameters [8]:Invalid parameters(Patch value not on valid JSON format.) and the curious thing I get it also for the remove operation. If I remove a property, why am I being asked for a value? Also, I tried to send an empty value correctly formatted as JSON, but to no avail.

Has anyone encountered this before?

Thanks a lot for any insights! 

await transientObject.ApplyPatchesAsync(
                    new[]
                    {
                            new NxPatch
                            {
                                Op = NxPatchOperationType.Remove,
                                Path = "/ExtendsId",
                                //Value = JsonConvert.SerializeObject("")
                            }
                    }, true);
                    await transientObject.ApplyPatchesAsync(
                        new[]
                        {
                            new NxPatch
                            {
                                Op = NxPatchOperationType.Remove,
                                Path = "/ExtendsId",
                                Value = JsonConvert.SerializeObject("")
                            },
                            new NxPatch
                            {
                                Op = NxPatchOperationType.Add,
                                Path = "/sourceObjectId",
                                Value = JsonConvert.SerializeObject(obj.Id)
                            }
                        }, true);

 

 

Labels (2)
1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

I think that's the error you get when you try to remove an unknown property. The "Value" property isn't really relevant there. If you replace "/ExtendsId" with "/qExtendsId" (which is the path used by the engine), then it works.

View solution in original post

3 Replies
Øystein_Kolsrud
Employee
Employee

I think that's the error you get when you try to remove an unknown property. The "Value" property isn't really relevant there. If you replace "/ExtendsId" with "/qExtendsId" (which is the path used by the engine), then it works.

catalin
Partner - Contributor III
Partner - Contributor III
Author

@Øystein_Kolsrud as always, you are right! Again, my many thanks. 🙂

 

Øystein_Kolsrud
Employee
Employee

Great! Don't forget to mark the question as resolved.