I have a call a create service on the success of a query service, but I have to achieve this scenario using java script.
pls help!!
I have a call a create service on the success of a query service, but I have to achieve this scenario using java script.
pls help!!
Hi -
Can you show the code you have tried?
For events handling please check this section:
:: http://docs.appery.io/documentation/r...
I will tell you the scenario :
I am mapping response of a service "$" to a java script.
In this java script i m calling a database inquiry service. And on the success of the inquiry service i have to call another create service.
Parameters of the create service will come from the $ which i have marked to JS.
So how can i write a success event of inquiry service in this JS where i can call the create service.
Hi Asif.
You need to "Add js" to your js in the mapping. http://docs.appery.io/documentation/r...
By means of this you can:
Access your "$" through the "value" variable.
pre
var user_name = value.userName;/pre
Invoke the service:
preserviceName.execute({data: {"parameter1": "val", "parameter2": val} });/pre
Hi Alena,
These 2 steps i m already doing, what i want is that after invoking the service i want to write success event of this service in the same js.
like step 1
code
serviceName.execute({data: {"parameter1": "val", "parameter2": val} });
/code
step 2
code
serviceName.onSuccess();
//my code
/code
something like this
Hi,
Using service event on the service data tab is more preferable
http://docs.appery.io/documentation/r...
or you could use code below:
pre
code
serviceName.execute({data: {"parameter1": "val", "parameter2": val},
success: function(){
//some code
}});
/code
/pre
Hi Igor.
Thanks a lot, this is exactly what i want.
How do I write an update service in java?..this update service has a where clause and a $set clause.
Hi -
Appery.io don't work with Java, every database service is a REST service you will need just to invoke it this way: https://devcenter.appery.io/documenta...
Database API is explained here: https://devcenter.appery.io/documenta...
I meant javascript