Mapping web requests into multi cardinality reference

I have two data types: Material and MaterialGroup.

MaterialGroup has a multi-cardinality reference to Material, and I’ve set up an external service that takes a list of Materials as input and returns a list of MaterialGroups that each have an array of Materials (using appfarm ID’s).

I want to generate MaterialGroups from a web request to my external service, and have the Materials connected in the multi-cardinality reference. Is there a way to do this using only the result parser?

My setup so far looks like this, but I have no clue what to do with the Materials* property (or if it’s even possible). Can I put comma separated ID’s there for example?

Hi!

A bit late response on this one maybe, but mapping into a multi-reference property works, if the format of the JSON is as this example:

{
name: “some name”,
materials: [“ID1”, “ID2”]
}

In the above example, you would just need to map materials. I have not tested directly with IDs, but with values of string-enums mapped into a multiref enum property.

PS: There is a bug however on the following: If an appfarm service endpoint returns a data source with multiref property to a “Run Service” action in apps, the value of the multiref property is not transferred. You would need to persist in the service, and read the object in the app.

1 Like