Structures as Input parameter of a screen.

Hi everyone,

I have used a list of structures in a screen to store values in case of dynamically adding the web blocks. I wanted to pass the same structure as an input parameter to another screen and it seems like it is not possible in mobile development. Is their a workaround for this?

Thanks & Regards,

Shivya Pant




Hi Shivya Pant,

You can serialize to JSON and pass has text. On that another screen you just need to deserialize the JSON.

@Edit: As Afonso said this is only for really simple structures and is more to send information to webblocks than other screens. if is something really complex you should do what he said. save it on the database and than load it on the new screen

Regards,

Marcelo

Hi Shivya,

I'd say you should refactor in order to build the structure content wherever it's necessary - send the information you need to the webblocks to build those structures instead of trying to send the structures themselves.

Shivya Pant wrote:

Hi everyone,

I have used a list of structures in a screen to store values in case of dynamically adding the web blocks. I wanted to pass the same structure as an input parameter to another screen and it seems like it is not possible in mobile development. Is their a workaround for this?

Thanks & Regards,

Shivya Pant




Hi Shivya the simple way to pass list of structures in input parameter, is to use Serializing/deserializing JSON.

this link will explain to you 

https://itnext.io/serializing-deserializing-json-in-the-outsystems-platform-ae08f2f6b5b4



Hi Shyvia,

First of all, I warn you that passing structures as input variables, because in terms of performance has a similar impact to the use of session variables, they are discouraged, as their use will help to fill the viewstate. , which makes screen loading slower. I think the best method will be the same as already mentioned, by JSON serialization, where on the first screen you serialize the structure to JSON, you pass variables as text to the second screen, and on OnInitialize you do the deserilization to JSON.

Check this exame: https://www.outsystems.com/learn/lesson/1881/handling-json-data/

If you need more help, let me know!?

Regards,
Nuno Verdasca