Passing variables between web screens using Reactive Web App

I know how to do it using the Traditional web but is there a proper way to transfer data held in variables from one web screen to another? Would I need to save it to a server entity in the first screen and then retrieve from that entity with a aggregate in the second?

To be specific, I am attempting to pass a variable of record type.


Landing Page - Gathers basic user information i.e. FirstName, LastName and Email - contains the Record of this information.

The Email data will be used as the User id. in the On Click Client, I have logic where I search to see if there are any other User Id with that email address. Depending on the result, I will either sent them to a Existing User logon screen OR a Create New User screen


Create New User Screen

I would like to retrieve this information so I can customize the Heading i.e. Hello John, please create a User ID.

I would auto populate the User ID field with the email input in Landing Page



Thanks

Hi Otis,

I don't think there is really a difference between traditional and reactive as it comes to passing values to a screen.  

The receiving screen should have input parameters, and the screen that initiates the transition should pass a value into them.  On the link or button or widget where you go to that screen, you will see the available parameters and be able to pass a value.

If you say you get it to work on tradional, it should also work on reactive, what exactly are you doing, can you share oml or screen prints ?

Dorine

Hi,

You cannot pass data of type Record.

Best practice is to pass the Id of the record and retrieve the data in the Preparation (Traditional web) or as a aggregate directly on the screen (reactive & mobile).

Regards,

Daniel

Solution

True, Input Parameters of type Record or List are not supported in Reactive Web.

Although I totally agree with Daniel on the best practice of passing an Id of a Record as an Input Parameter, I just want to leave a second option here if you still want to be able to pass the 'entire Record' to the second screen.

  • Create an Input Parameter of type Text for the second screen
  • On the first screen assign the <Entity>Record inside a client action that is bound to your Link or Button
  • JSONSerialize the <Entity>Record into a JSON string
  • Pass the JSON string to the second screen's Input Parameter in the Destination widget
  • On the second screen create an OnInitialize event
  • Create a local variable of type <Entity>Record
  • Use DeserializeJSON in order to convert the JSON string back into an <Entity>Record
  • Assign the value to the <Entity>Record local variable

Hope this helps.

Regards,

Nordin

Solution

Hello sorry for the late response... I want to thank everyone for the suggestions and advice, all was helpful. Thanks Nordin for the example. I used it and it works great. I believe it works great for the current use case so I am going to mark your as the solution.GREAT JOB!!!!!


Thanks everything again!!