SAP Knowledge Base Article - Public

3612902 - FormUserRatingComment API query is returning empty "rating": "" with Rating Option=0

Symptom

  • Unable to fetch PMGM rating using API, with a form that is using Rating Option 0.
  • Error occurs when using FormUserRatingComment with ratingType='na'.
  • No rating data is returned in the API response, it is just simply:

    "rating": "",

            "ratingPermission": "none",

            "ratingKey": null,

            "textRating": null,

Environment

SAP SuccessFactors Performance Management

Reproducing the Issue

  1. Use the API query: http://<api-server>/odata/v2/FormUserRatingComment(formContentId=xxxxL,formDataId=xxxxL,itemId=xxxxL,ratingType='na',sectionIndex=x,userId='xxxxxx')?$format=json.
  2. Attempt to fetch the rating data.
  3. Observe that the rating data is not returned in the API response:

    "rating": "",

            "ratingPermission": "none",

            "ratingKey": null,

            "textRating": null,

Cause

  • The ratingType parameter in the API query is set to 'na', instead of 'official'

Resolution

  1. Change the ratingType parameter in the API query to 'official'.
  2. Use the updated API query: http://<api-server>/odata/v2/FormUserRatingComment(formContentId=xxxxL,formDataId=xxxxL,itemId=xxxxL,ratingType='official',sectionIndex=x,userId='xxxxxx')?$format=json.
  3. Verify that the rating data is successfully fetched in the API response.

See Also

Keywords

pmgm, api, rating, sap successfactors, performance & goals, form features, ratingType, official, na, fetch, review, data, rating option , KBA , LOD-SF-PM-API , Webservices, OData APIs , How To

Product

SAP SuccessFactors Performance & Goals 2505