Skip to Content
0

Can i use RAPIDPROTOTYPE for generate button automatically? There are alternatives?

Nov 29, 2016 at 02:44 PM

144

avatar image
Former Member

I would like create 4 buttons basing on a BW query with hierarchy like that:

  • 1) element_1
  • 2) element_2
  • 3)_element Other
  • 3a) El_o_1
  • 3b) El_o_2
  • 4) Element_3
  • 5) Not assigned

I tried to use the followind code:

var buttonhtml = "<button type='button'>Click Me!</button> ";

var html ="";

var dim = BRAND.getDimensions();

var rows = DATAITERATOR_1.getRows(0,10); 

rows.forEach(function(element, index) {  

var dimText = element.getDimensionValueText(element.key);  

html= html + buttonhtml;});

RAPIDPROTOTYPE_1.setHTML(buttonhtml);

inspired by:

https://blogs.sap.com/2016/02/08/design-studio-16-sdk-data-iterator-read-your-data-row-by-row-finally/

IWhen i run the app nothing appears.

Maybe i have to configure the RAPIDPROTOTYPE in a particulal way?

It si the right workaorund for generating buttons dinamically?

Thanks

Marco

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

2 Answers

avatar image
Former Member Nov 30, 2016 at 05:19 AM
0

Hi,

It is very straight forward. When you try to run, did you checked the developer tool console to make sure that there are no error in console.

Thanks,

Nithyanandam

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 30, 2016 at 09:11 AM
0

Hi this is the dashboard, no error log.

but in "script problems":

I have only error related to others app

This is what i see when i run it:

And the script in GLOBAL script area:

Thanks


prototype.png (79.1 kB)
runned.png (2.9 kB)
sscript.png (23.0 kB)
errors.png (60.3 kB)
Share
10 |10000 characters needed characters left characters exceeded