Hello everyone,
Some context regarding my issue :
I have a SharePoint List collecting all the claims regarding a specific process. Those claims are created with a PowerApps form.
Several people must modify informations on the claims depending of the situation in the process but only the creator of the claim must change the status to "Completed".
I am not able to activate the item level restriction to creator only because since several people must modify the claims at some point.
To make sure that only the creator of the claim is able to modify the status value to "Completed" I have created a flow.
My flow :
1- Trigger : When an item is created or modified on SharePoint (condition to trigger the flow : Status value must be "Completed").
2- Condition : Editor = Author
If yes : Do nothing.
If no :
3- Message : Define the before last Version Number by using the folowing formula and adding ".0" to it :
sub(int(items('Apply_to_each')?['{VersionNumber}']),1)
(I will need this information at the end of my flow)
4- I need to retreive the Status value of the before last Version Number so first I need to Get the versions numbers and the values in it.
5- Parse JSON so I can retreive the values of the HTTP request easily. This is where I have my issue.
The content is the body of my HTTP request
The Schema is a copy paste from the result of the HTTP request body :
When I run a test I have the following error message :
{
"errors": [
{
"message": "Invalid type. Expected String but got Null.",
"lineNumber": 0,
"linePosition": 0,
"path": "d.results[12].dateassigned_x005f_x002b_x005f_2",
"schemaId": "#/properties/d/properties/results/items/properties/dateassigned_x005f_x002b_x005f_2",
"errorType": "type",
"childErrors": []
},
{
"message": "Invalid type. Expected String but got Null.",
"lineNumber": 0,
"linePosition": 0,
"path": "d.results[13].dateassigned_x005f_x002b_x005f_2",
"schemaId": "#/properties/d/properties/results/items/properties/dateassigned_x005f_x002b_x005f_2",
"errorType": "type",
"childErrors": []
}
]
}
When try to change the type of this data from String to Null on my schema, I have the following error :
{
"error":
{
"message": "Invalid type. Expected Null but got String.",
"lineNumber": 0,
"linePosition": 0,
"path": "d.results[0].dateassigned_x005f_x002b_x005f_2",
"value": "2023-11-15T13:16:17Z",
"schemaId": "#/properties/d/properties/results/items/properties/dateassigned_x005f_x002b_x005f_2",
"errorType": "type",
"childErrors": []
}
}
It is the opposite... Except on the second error message he recognize the value and not on my first try.
I don't know what is happening, is anyone able to help me ?
Thank you very much.