on 03-01-2016 9:27 AM
We are using OData services to update data in Folder (Case) Management. In the implementation we are translating the values passed into a name-values table. Problem is now that when the structure contains an empty value, we don't know whether the value is not passed (no update in folder management), or the value is passed as initial and needs to be updated in folder management.
How can I find out which fields are passed in the payload with the POST and/or the PUT action?
The PATCH could be a solution, problem is that we do a deep-insert most of the time to prevent locking. PATCH is not allowed for deep-insert.
Regards,
Paul Lauwers.
Application Engineer at IFF
Hello Paul,
Can you explain you requirement with an example?
Cheers
~Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To update folder management, we have to translate the values passed into an internal table called with name/value. The internal table is used to update the folder.
If my entity set has the following fields:
{
"d" : {
"DescriptorId" : "0000000001",
"DescriptorName" : "AGREST",
"GrapheColor" : "CB8C52",
"MaterialFlag" : ""
}
}
I translate the fields into the internal tables:
Name Value
DescriptorId 0000000001
DescriptorName AGREST
GrapheColor CB8C52
The last field MaterialFlag is not appended into the internal table because of the initial value. In the above payload the value is passed and it should have been appended with initial value so that it would be updated to initial. However when the payload was:
{
"d" : {
"DescriptorId" : "0000000001",
"DescriptorName" : "AGREST",
"GrapheColor" : "CB8C52"
}
}
The MaterialFlag should not have been appended. I would like to know which fields are passed in the payload to determine whether the field needs to be appended.
Regards,
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.