Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi,
Am using an Odata service with some filters, I use $select to select specific part properties among all.
Lets say am querying a part detail in that, "GeneralStatus" is the property am looking for, but this particular property is not available in some of its child parts. Because of the am getting error for API call.
{
"error": {
"code": null,
"message": "The property 'GeneralStatus', used in a query expression, is not defined in type 'Part'."
}
}
Question is, is there a way to skip the selection if property not available? so then we can avoid error coming from nth child?
like, $select=GeneralStatus(if available),Name,Number
thanks,
Jankiraman
@Janaki.Raman , I am not experienced with this but can you add a condition to your selection where the "GeneralStatus" != ""
What you are doing is trying to exclude the rows from the table which don't have the value, Aa a result you avoid the issue.
Just a guess
pehowe
Hi,
If some child parts is not having General Status, then its better to fetch all the data first and then extract what ever you want.