18
Views
6
Comments
Solved
Navigation Screen
Application Type
Traditional Web

How I could pass list value from WebBlock to Navigation screen 

that's error appear when try to pass list parameter to screen :

Invalid Link

Arguments of 'RecordList' data type are not allowed in links with 'Method' property set to 'Navigate'.

Solution

Hi! 

The problem is exactly that , a screen can not receive a list as parameter.

There are several solutions to your problem here are two: 

1 . If yours is a big list try to create an entity to hold the list and send only an identifier that is common to all the records you have in your list . After using the list dose records can be deleted.

2 . If list as just a few records,  use widget    JSONSerialize to transform the list in a text   send that text as the parameter

   in the new screen use JSONDeserialize to transform the text in a list variable. 

 Hope this help

Graça

 

mvp_badge
MVP
Rank: #72

Hi Balqis,

The question you ask is how could I pass a List from a Web Block to a Parent Screen, correct?

In this case you need to use Events in order to pass data from a Web Block to a Screen

Since you are developing a Traditional Web Application, you are not allowed to use an Input Parameter of type List in the Handler of the Event on the Parent Screen. However, there is a little trick (other than JSON Serialize/Deserialize) that would still allow you to pass a List from a Web Block to a Parent Screen through an Event. 

For that, you would need to define a Structure with an Attribute of type List like the following example.

Now you can use this Structure as a data type for the Input Parameter of the Event inside the Web Block. Since it contains a List as an attribute, you can append values to that List before triggering the Event. This will allow you to pass the List to the Parent Screen through an Event.

See example here: https://nordinahdi.outsystemscloud.com/PassListBlock2Screen/

The OML is attached.

Hope this helps!

Regards,

Nordin

PassListBlock2Screen.oml