Special ACP features


A few special enhancements made to ACP for a customer using ACP as one part of a "mash-up" application. These features allow data to be passed into ACP via an URL, and model results to be passed back to the browser via Javascript. Currently these features have been deployed on the customer's ACP server. But the code will also be available soon on Lumina's AnalyticaCloudPlayer.com server. If you are interested in using the functionality, please email acp@lumina.com and we will help you.

Setting variable definitions using url encoding

You may want to pass in model data to a model in ACP. For instance, you could url encoded the user id of the person, a location, current stock price etc.

Here's how you do it. If you have a variable in your model with identifier x, and you want to give x the definition of 3.14, you append &p_X=3.14 to the url.

Here's a more detailed spec.

Calling JavaScript functions in the browser

So you want to call some Javascript code from ACP. First, you probably need have ACP installed on your own dedicated server or you could have you model playing in a web page on your server.

First you create a variable in your model that will return the javascript code to be executed as text value. So if you want to call a JavaScript function called 'myJavaScriptFunction' that has two parameters, you create a variable in Analytica e.g.

java_script_code:= "myJavaScriptFunction(" &first_number & "," & second_number&");"

Then create a Button in the model (e.g. with identifier js_button), and set its CloudPlayerStyle attribute:

CloudPlayerStyles of js_button:= javascript: java_script_code

Now when this button is pressed in ACP, the javascript code will be executed in the browser containing ACP.

Dave, can you add some more details and/or examples, and some screenshots pls

See Also

Comments


You are not allowed to post comments.