JSON Limitation when passing to Pop-up Window

Hi Guys,

Just need your clarification. I am converting a record to JSON and pass the JSON to the Pop-up Window.

One of the fields is a text data type with length of 2000. I am only using around 200 character and it seems that I am getting an error when the text field has this character length. When i set the value to blank the Pop-up window loads properly.

Error when opening the pop-up window if the field has more than 200 character.

Is there a limitation as to the number of characters when passing it as a JSON?



Hi Michael Chu,

You can send only upto 255 characters on URL 

go through this link

https://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string

Infact you can send the data through input parameter with complex data type.

You can also you Modal widget which is available in outsystems UI 11

Regards,

Koushik

Hi Michael,

Yes, there is a limitation.
I would use a different approach.

If you want to use a Popup instead of a Modal (you modal widget in OS9, OS10 and OS11, not sure for older versions), I recommend you to avoid passing the whole record, but only the ID (if it is in the database).

Then in the preparation of the Popup, you retrieve the data.

Cheers.

Eduardo Jauch wrote:

Hi Michael,

Yes, there is a limitation.
I would use a different approach.

If you want to use a Popup instead of a Modal (you modal widget in OS9, OS10 and OS11, not sure for older versions), I recommend you to avoid passing the whole record, but only the ID (if it is in the database).

Then in the preparation of the Popup, you retrieve the data.

Cheers.

Thanks guys for the clarification.  I may need some workaround for this because the record being edited is in a list(temporarily or already saved in database), so i cannot pass the ID if it is not yet saved in the database.


Hi, 

If you need to use a Pop-up, you will end up having to store the data temporarily in database. 

I would avoid passing all this data to the pop-up, trying alternative approaches. Workarounds will depend on why do you need to pass this data to the pop-up in the first place. 

Using a modal would solve this issue as the contents of the modal are in the screen, not another one, and thus they have access to the data in the screen. 

Cheers