237
Views
9
Comments
Passing client variables between modules
Question


Hello


I want to pass a client variable to another module, but it doesn't work.

Looking at other examples, they used JSON etc., so I didn't understand it well.


What I want to do this time is put 1.2.3 in the client variable and there is a header with items displayed for each one.

I want to change the items displayed in the header in a separate module from the module that created the screen.


OML is attached.


I can't attach two oml, so I will attach them separately.


If anyone understands, I would appreciate it.

Header.oml
UserImage.jpg
kazuma yamagata

Another OML. I want to take over the client variables here

headersample.oml
2023-03-31 06-39-46
Asad Sheikh

Hi @kazuma yamagata 


Two modules within one application one producer module and second is consumer module. In Producer module I created One screen and client variable and then Consumer module I created a screen where we want to direct. In Consumer screen I created input parameter set mandatory No . Take the reference of producer module Consumer module ask for input parameter then we passed the client variable. I have attached the updated OML.  
Reagrds,

Asad

HeaderUpdated.oml
UserImage.jpg
Kiran Shetty

Hi @kazuma yamagata 

these are threads which i attached you can go through

https://www.outsystems.com/forums/discussion/62345/passing-variables-between-web-screens-using-reactive-web-app/


https://www.outsystems.com/forums/discussion/69623/how-to-transfer-the-page-variable-from-one-page-to-other-in-outsystem-reactive-we/


https://www.outsystems.com/forums/discussion/74943/how-to-pass-an-object-to-another-screen/


https://www.outsystems.com/forums/discussion/75072/how-to-persist-data-between-modules/


https://www.outsystems.com/forums/discussion/84357/passing-varibles-to-other-modules/


Regards,

Kiran


2023-03-31 06-39-46
Asad Sheikh

Second OML

headersampleUpdated.oml
UserImage.jpg
kazuma yamagata

Hello Assad


Thank you for letting me know.

However, there are some things that I don't understand, so let me ask you a question.

Why did you create a client variable and an input variable called Name?

Also, I didn't know where the client variable passing was happening.

I'm sorry, but I would like you to tell me.

Kazuma

2023-08-28 09-08-29
Venkatesh Sundarajan

Hi Kazuma,

Passing client variables between modules,

Let's say you have module A and module B, where module A wants to send client variable to module B means,

Create a common module for client variables let's say module C, 

Now you have a client variable in module C. 

Create a "client action" with the "input parameter" of the client variable data type for Eg: name the client action as "SetClientVariableA", make this as public in module C.

Inside this action assign the client variable with the input parameter.

Create a "client action" with the "output parameter" of the client variable data type for Eg: name the client action as "GetClientVariableA", make this as public in module C.

Inside this action assign the output parameter with the actual client variable.

Now you got Set and Get actions of a client variable. 

You can consume this "SetClientActionA" in "ModuleA" where you are setting the client variable and pass it as input parameter.

You can consume this "GetClientActionA" in "ModuleB"where you need the client variable value. you will get it as output parameter.

This can be an approach which may help to achieve your goal.

Thanks.


2023-08-28 09-08-29
Venkatesh Sundarajan

Hi Kazuma,

You can have the client variables and its get and set client actions in either module A or module B itself as per your application architecture without the need of module C (all other steps remains same). I have mentioned module C to group these kind of activities. It's not mandatory that you have to create module C.

Thanks.

UserImage.jpg
kazuma yamagata



Hello


Thank you for the clear explanation!


Now that I've got the gist, I'll try to move it around a bit!


I think there will still be some parts that I don't understand, so thank you at that time.


UserImage.jpg
kazuma yamagata


Excuse me


I didn't know how to store client variables and pull them out in different modules.

Is it possible to have an example using OML explain?


If you can, thank you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.