'LocalToDo' data type required instead of 'ToDo Record List'

Hi,


I am quite new with OutSystems and currently, I'm learning how to use it. I've been following every single step provided in the exercises on the Mobile App Development but has been facing problems with the exercise of 8.5x (5 (j)) where I had to assign LocalToDos = GetToDosByUserID.List. I'm unsure which part did I messed up because so far, everything was working fine. Much appreciated if any help provided.


Regards,
Kenny

Hello Kenny,

Hope you're doing well.

In order to do that assign, both LocalToDos and GetToDosByUserID.List must have the same variable type. Or at least they should have similar data types so you can perform a mapping between them.

I believe that the problem is related with your LocalToDos variable.

Please confirm the Data Type of this variable :) it should probably be a LocalToDo List, instead of beeing from LocalToDo Data Type. After that, you should be able to do the assign and the respective mapping.


Kind regards,

Rui Barradas

Solution

Hi Kenny,

In addition to Rui's note.. 

The LocalToDos Output parameter data type and the defined assignment node would look as shown below

Hope this helps you!


Regards,

Benjith Sam

Solution

Rui Barradas wrote:

Hello Kenny,

Hope you're doing well.

In order to do that assign, both LocalToDos and GetToDosByUserID.List must have the same variable type.

I believe that the problem is related with your LocalToDos variable.

Please confirm the Data Type of this variable :) it should probably be a ToDo Record List to match with your GetToDosByUserID.List variable, instead of beeing from LocalToDo Data Type.


Kind regards,

Rui Barradas

 

 Hi Mr. Rui Barradas,


Thanks for your prompt reply. May I ask if I should modify the Output Parameter's Data type to List Of Record while remaining LocalToDo : LocalToDo like the attached below? If this is it, I guess it fixed my problem :D


Edit: Whoops, just noticed Mr. Benjith Sam's comment. I've tried both solutions and seems like both are working fine. May I know what will happen if I assigned it as List of Records and LocalToDo : LocalToDo like the attached below? Just for example.


Regards,

Kenny



Hi Kenny,

Please refer this Forum Post - https://www.outsystems.com/forums/discussion/14342/from-record-lists-to-lists/#Post53062

Hope this brief explanation regarding the Compound type variable topic will help you :)


Edit: As per the mentioned objective, I think you should define the LocalToDos variable as List type variable instead of Record List variable because the variable is intended to only hold one/more records (List) of the LocalTodDos entity type record (referencing a single record definition)


Regards,

Benjith Sam

Hello Kenny,

Yes, you are correct. In this scenario, you should change the Data Type from your Output Parameter LocalToDos =)

When you created this variable, the Data Type was LocalToDo. You just need to change the Data Type to a LocalToDo List - a list of LocalToDo records.

It seems that it is just working fine :)


Kind regards,

Rui Barradas

Thanks, Mr. Benjith Sam & Mr. Rui Barradas. In the meantime, I will look into the post to improve my understanding of the list. Thanks again and have a pleasant day ahead.


Regards,

Kenny

Kenny Kueh wrote:

Thanks, Mr. Benjith Sam & Mr. Rui Barradas. In the meantime, I will look into the post to improve my understanding of the list. Thanks again and have a pleasant day ahead.


Regards,

Kenny

You are welcome, Kenny :)

Glad I could be of help, pleasant day you too :)


Regards,

Benjith Sam

You are most welcome Kenny =)

As I noticed, you tried to mark both mine and Benjith's answers as a solution.

In the current version of OutSystems Forums, unfortunately this is not possible and only one solution is allowed per thread. It is one of the features that I hope that will become available in the future.

Anyway, it is totally fine for me with you picking Benjith's reply as a solution :)


I wish you a pleasant day as well :)


Kind regards,

Rui Barradas