cancel
Showing results for 
Search instead for 
Did you mean: 

Refreshing WebI data provider with optional prompt

Former Member
0 Kudos

I am having an issue refreshing a data provider (or document, we've run into the same issue there) which contains an optional prompt.

I'm using a JSON GET to retrieve the parameter values :

{

  "parameters" : {

    "parameter" : [ {

      "id" : 0,

      "technicalName" : "psMandatory Prompt 1",

      "name" : "Mandatory Prompt 1 :",

      "answer" : {

        "values" : {

          "value" : [ "VALUE1" ]

        }

      }

    }, {

      "id" : 1,

      "technicalName" : "psMandatory Prompt 2",

      "name" : "Mandatory Prompt 1 :",

      "answer" : {

        "values" : {

          "value" : [ "VALUE2" ]

        }

      }

    }, {

      "id" : 2,

      "technicalName" : "psOptional Prompt",

      "name" : "Optional Prompt :",

      "answer" : {

        "values" : {

          "value" : ""

        }

      }

    } ]

  }

}

I fill out the values, except for the last one which is not needed, and POST back the JSON.

No matter what I try with the last parameter value, it doesn't seem to "empty" the optional prompt.  I've tried removing the parameter from the list, which generates an error; I've tried setting "value" to an empty string or null, which just returns empty results, indicating that the prompt has not been removed from the query. 

How do I need to modify this JSON to make my optional prompt disappear?

I'm running 4.2 SP2 patch 2.

Accepted Solutions (1)

Accepted Solutions (1)

former_member197386
Active Contributor
0 Kudos

Hi Emily,

Please, could you check this thread?

http://scn.sap.com/thread/3935276

Regards,

Anthony

Former Member
0 Kudos

Thanks, Anthony, I missed that one somehow in my search.

Answers (1)

Answers (1)

daniel_paulsen
Active Contributor
0 Kudos

Hi Emily,

What API (url) are you using to refresh the dataprovider?

Can you also provide the full response for all 3 parameters when you use the GET method?  Specifically, I'd like to see the additional attributes such as @optional, @type etc.  If its a lengthy response with possible values, you can add "?lovInfo=false" to the request to avoid retrieving the list of values.

Thanks,

Dan