Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2794

Passing Variables to an object

$
0
0

Hi,

 

I am currently trying to create a loop for a block of Javascript i have written to set a number of elements in a KPI Tile.

 

The code dilters my dataset to a single value based on a dimension of "KPI_No". All the values i need are also stored as dimensions in this single row.

 

I populate an array with the single value and then loop through each (the only one) elements in the array to pass in to a string. I then use this string value to set the text of variious elements (E.g the title, the valye. the prefix).

 

I currently have a page set up to hold up to 20 KPIs, but this page is complete dynamic and is populated depending of the KPI ref agaisnt the KPI_NO (1 - 20) in a seperate table.

 

I current have a number of line of javascript to set the first KPI elements, then reuse the code and change the object names from say "KPI_Title_01" to "KPI_Title_02".

 

I would love to be able to pass the "02" part of the object via a global variable or as some kind of loop, but i have a feeling that this may be difficult given the nature of the object naming and the fact we cant create standard loops in SAP javascript.

 

All ideas welcomed.

 

Many Thanks

John


Viewing all articles
Browse latest Browse all 2794

Trending Articles