983
Views
2
Comments
Solved
'Record List' data type required instead of 'Text'.
Application Type
Reactive

Hi all,


I am having a problem when calling a structure variable into a for each loop, purpose is to save multiple users into the list, can't upload the .oml file here as I couldn't get pass the 1 click publish, attached herewith the .oml befor implementing for each.

Thanks


Ming

Lance Q7.oml
2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Ming,

Hope you're doing well.

I do believe that the error message is clear, as it means that you are passing a text variable when you should be passing a list.

The For Each widget repeats the execution of a certain logic for each entry in a Record List.


I did check your code and you don't have a list to iterate, because Call_CrystalStruct input parameter has the data type Crystal_Struct (not a list) and Call_CrystalStruct.MemberId is a Text.


Just to be clear, you can't pass a structure variable into a For Each loop, you have to pass a Record List. You can however use a Crystal_Struct List into a For Each loopbut you'll have to adapt the logic associated:


Kind regards,

Rui Barradas

2021-08-12 05-19-40
Shubham Janbandhu
Solution

Hi Ming Y,

For "for each" loop always need to assign a record list, in above image it should be like Record list = Call_CrystalStruct.List and pass only current record like "Call_CrystalStruct.List.Current" to CreateorUpdate action.

ex- 

Hope this will help you.

Thanks,

Shubham


2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Ming,

Hope you're doing well.

I do believe that the error message is clear, as it means that you are passing a text variable when you should be passing a list.

The For Each widget repeats the execution of a certain logic for each entry in a Record List.


I did check your code and you don't have a list to iterate, because Call_CrystalStruct input parameter has the data type Crystal_Struct (not a list) and Call_CrystalStruct.MemberId is a Text.


Just to be clear, you can't pass a structure variable into a For Each loop, you have to pass a Record List. You can however use a Crystal_Struct List into a For Each loopbut you'll have to adapt the logic associated:


Kind regards,

Rui Barradas

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