Passing the data from a Server action to another Server action


I hope to pass the Id that I get inside  the Assign "Japanese1"  in server action "Skip"   to another server action.   What I want to make happen is to receive  "English" Attribute on the same row including a "Japanese" Attribute I get in Assign "Japanese" in Skip server action and  to put the "English" Attribute in Assign "English"  in "Answer" server action.


But I'm not sure how to implement this.  

What is the first step?

I'd appreciate it if you could tell me about it.


Best Regards,

Solution

Hi Tsubasa,

To share information between "screen actions", you need to use variables:

a) Web Screen Local variables. They are available in the context of the page (canvas, preparation, screen actions). When you set the value in a screen action, and later call another screen action on the same page, you can use the variable with the value set previously.

b) Session variables. They are available in the context of the entire module. Once you set the value of a Session Variable, it is available everywhere inside the module.

c) Store in database. Requires additional entity(s) and logic (do not recommend for something so simple).

Just remember that you CAN'T call a screen action from another screen action, only from the page (canvas widgets).

Hope this helps you.

Cheers.

Solution

Hello Tsubasa Yoshikawa,

In Answer screen action action you are just using assignment widget to assign value to English Local variable,
why you want to do it in another screen action,best way is to  assign both the japanese and english variable in the same screen action in a go...