From List to Record List

Hi,

iam querying a rest service and i need to pass the result to an extension. The result of the rest api contains some Lists of objects.

I rebuilt the structure in integration studio, but here i can only select a Record List and not a List.

I wonder if there is an easy way to pass the rest result into the extension parameters without looping thru the result and recreating the target structure ? 

Thank you very much

Stefan

Solution

Thank you @Kilian Hekhuis, @Lennart. Unfortunatly that is the case. I ended up now rebuilding the record list structure.

Stefan

mvp_badge
MVP

Hi Stefan,

Why are you rebuilding the List in the Extension? What is your goal here? You would typically only create a Structure in an Extension in case the Extension governs it by means of its functionality, but that doesn't seem the case here.

Hi Kilian,

in my extension iam serializing smart contract payload. How this payload needs to be serialized is defined by the structs and types of a smart contract definition (that is the abi structure). 

Stefan

Hi Stefan,

When assigning a List variable as value to a RecordList variable, OutSystems will implicitely convert these (effectively copying its contents).
So possible solution could be to use 3 variables (Types, Structs, Actions) of type RecordList and assign the lists from the webservice to those.

Regards,
Lennart

mvp_badge
MVP

That's only if they don't contain Record Lists themselves, unfortunately.

Solution

Thank you @Kilian Hekhuis, @Lennart. Unfortunatly that is the case. I ended up now rebuilding the record list structure.

Stefan

mvp_badge
MVP

Yes, that's probably the only option you have, unfortunately (save mucking around with reflection and such, but I wouldn't recommend that in this case).

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