Why can not I receive a list as input parameter of a screen action?
Question

I have a web block with an event, it is inside another web block with an action for your handler, but this action does not allow me to receive a list as input parameter.

mvp_badge
MVP

I actually wanted to post this same issue.

When you create the event on the webblock you are allowed to define a list on it.

But when you want to implement the event handler it is not allowed, that does not make sense.

Even more strange in Mobile App it does work as expected.


mvp_badge
MVP

Hi,

In WEB you can't have an Input Parameter in a Screen Action with Data Type List of something.
So, while the event accepts (probably because the code is basically the same as in Mobile, it does not work...

I'll pass this to the team so they make this more coherent.

Cheers.

mvp_badge
MVP

Hi Eduardo,

Yes I know on screen you can not have input parameter with type list, that is also in the documentation.

But I think on Webblock event it should work, now it only works on the event, but not on the eventhandler.

As it does work correctly in Mobile I assume it is a bug.

Regards,

Daniel

mvp_badge
MVP

Hello Daniël,

I don't think it is a bug in the same way.

In mobile works because client actions can have an input parameter that is a list.
In WEB not. So, as the event will call a screen action, you can't really pass a list to the action. 

The problem (but) in WEB it seems to be that Service Studio allows you to create an input parameter in the event to pass a List, not that the screen action does not accept it.

Cheers.

mvp_badge
MVP

Well it would be nice if we could pass a list back to the parent. Now we fall back again on the Serialize/Deserialize Json structure. Just two extra steps that easily could be avoided.

mvp_badge
MVP

Daniël Kuhlmann wrote:

Well it would be nice if we could pass a list back to the parent. Now we fall back again on the Serialize/Deserialize Json structure. Just two extra steps that easily could be avoided.

I agree. It would be nice being able to pass a list, through an event, back to the parent. But this would require some changes, so that, for example, a screen action with such a parameter couldn't be allowed to be called from the screen...

Cheers.


In my situation to solve this problem I created a structure with a list attribute, in that way I could pass typing the input of the screen action to receive the structure, hence the list.

mvp_badge
MVP

Lucas Souza wrote:

In my situation to solve this problem I created a structure with a list attribute, in that way I could pass typing the input of the screen action to receive the structure, hence the list.

That is a better solution than serializing/deserializing, works perfectly. Thanks for sharing.

Then I agree fully with Eduardo, than on the event it should be changed to not allow for a list as input parameter.

mvp_badge
MVP

Hum... 

There is no sense in allowing a structure with a list as an input parameter for a Screen Action, but not a list itself... 

mvp_badge
MVP

Eduardo Jauch wrote:

Hum... 

There is no sense in allowing a structure with a list as an input parameter for a Screen Action, but not a list itself... 

I don't mind :)


Yep I agree seems crazyand obviously a bug -  to require a structure with list attribute rather than a straight list of structure esp when within web you can define a list within an event but can never handle it... 

Hi Barnaby,

You are right. I'll increase the priority of this fix. BTW, in the meantime we've launched reactive web apps where that is not an issue and you can pass lists in events.

Cheers,
Tiago Simões 

Please fix this, its been over a year now :(

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