cancel
Showing results for 
Search instead for 
Did you mean: 

Pop-up box & condition

Former Member
0 Kudos

Hi,

We have created some pop-up boxes (Text object with html), but we would like them to be displayed based on certain conditions. For instance, if a function is executed successfully, the pop-up box should not appear. Or if a key figure has a specific amount, the pop-up box should appear.

Is there a way to build a logic to achieve that?

The white paper 'How To validate key figure values in Manual planning' can issue error messages but does not give the user the ability to execute or not a subsequent function.

Thanks for any help.

David Thoumieux

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi David,

What are your javascript skills like?

You could use javascript to read the contents of the message box, check for successful planning functions, then throw up a pop-up choice to execute a BPS planning function (search the forum - there are a few threads for executing functions using javscript) depending on a condition determined by a range of key fig values that you specify....

Marc Bernard posted the following script as a way to sort through the message box and only return messages of a certain message number...........use this as a start to scroll through a return/find certain message types, then write a little script which executes the relevant BPS function.....

Good luck,

Rael

<SCRIPT LANGUAGE="JavaScript">

var msg_table = document.all("msg_table");

if (msg_table != undefined ) {

// Loop over all rows and hide some

for (var j = 0; j < msg_table.rows.length; j++) {

var msg_text = msg_table.rows[j].innerHTML;

// Regular expression pattern to look for message

var msg_search = /msgid=UPC.*msgno=301/i;

if (msg_text.search(msg_search) > 0) {

msg_table.rows[j].style.display = "none";

}

}

}

</SCRIPT>

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi David,

See if the below thread helps with some information on the same.

Cheers

Anurag