Skip to Content

Design Studio 1.6 : Merge Prompt puzzle

Nov 02, 2016 at 04:47 PM


avatar image

Hello Experts ,

I need your expertise to find solution to this problem .

We have 5 BEx queries as Data sources . These Data Sources have 3 prompt variables

The first prompt is merged in all other Data Sources . But Distribution Channel & Division is unmerged at BEx level .

Hence if we keep the prompts unmerged ; I will have to provide answers to 5*2=10 prompts of Distribution Channel & division while Sales Organization does not need to be answered .

I am following this blog post to approach this -

and kept

At 'On Before Prompts Submit' I have added this code as suggested in the blog post -

var Prompts=SALESORDERS.getVariables(); /*returns an array of the prompt variables */

Prompts.forEach(function(element,index) {

CREDITMEMO.setVariableValueExt(, SALESORDERS.getVariableValueText(;

CREDITSUM.setVariableValueExt(, SALESORDERS.getVariableValueText(;

INVGRAPH.setVariableValueExt(, SALESORDERS.getVariableValueText(;

INVTEXT.setVariableValueExt(, SALESORDERS.getVariableValueText(;


But while testing I can see even after providing values for first two "Distribution Channel" and "Division" it's asking for the values in (10-2) = 8 more entries . Hence it's obvious the code is not working .

I am suspecting I am doing something really foolish here which I am unable to catch due to lack of experience with Design Studio.

Kindly help me out to merge the prompts properly.

Sourav Roy

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Martin Rapp Nov 02, 2016 at 08:56 PM

Hello Sourav Roy

Could you please try to use the script function getVariableValueExt instead of getVariableValueText ?


Martin Rapp

10 |10000 characters needed characters left characters exceeded
Martin Pankraz Nov 03, 2016 at 08:39 AM

Hi Sourav,

getVariables() retrieves all variables, even those which are not input-ready. If you try to assign something to them, your script will crash. You can avoid that by checking the availabld methods of your BEx variables. Also consider Martin's remark above.

Kind regards


10 |10000 characters needed characters left characters exceeded
Sumit Dubey Nov 03, 2016 at 04:59 PM

Hi Sourav,

getVariablesValueExt() would consume all the values irrespective of the how many prompts you have defined in your queries. Martin has suggested it rightly.


10 |10000 characters needed characters left characters exceeded