cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Analytics Cloud for planning - Show Popup after OnResultChanged event

guenay
Participant
0 Kudos

Greetings everyone,

I have a table with planning capabilities, and I'm aiming to implement a feature where a popup appears when a value greater than x is entered.

My plan is to utilize the OnResultChanged event, but I'm uncertain about the setup process, particularly involving an IF clause.

I'm eager to hear your suggestions and ideas on this matter.

Best regards, Ismail

 

View Entire Topic
N1kh1l
Active Contributor
0 Kudos

@guenay 

You can try using the getresultset() in onresultchange of table to read all cells of the table in a loop and then check for the condition you want to check.  

Raw example below

My Table

N1kh1l_0-1709839168322.png

 

Added a popup as below

N1kh1l_1-1709839301713.png

 

 

Popup on Button click has below code

if (buttonId==="btn_ok")
{
Popup_Warning.close();
}

OnRsultsChanged event of Table has below code

var resultSet = Table_2.getDataSource().getResultSet();
console.log(resultSet);
for (var i = 0; i < resultSet.length; i++)
{
var value=resultSet[i]["ZACCOUNT_TEST"].rawValue;
var conv_value=ConvertUtils.stringToInteger(value);

if (conv_value>10000)
{
Popup_Warning.open();
}

}

Final Output: entering 12000 triggered the warning popup

N1kh1l_2-1709839570725.png 

 

You can adjust according to your requirement.

Br.

Nikhil

 

 

guenay
Participant
0 Kudos
It worked perfectly. Thanks a lot Nikhil.