I seem to be unable to reference the result value of a math module that is slightly more complex than a simple value.
When using the math module, if I have a relatively simple expression, the resulting value is easy to reference, as shown:
However, when the expression is slightly more complex, the resulting value is put into a collection that doesn’t expand and that I can’t figure out how to reference:
I’ve tried all sorts of things:
map() gives an error that it’s not a valid array
toArray() just creates an array of collections for some reason
*get() and pick() also give weird errors.
Does anyone have any tips for how to force the collection to expand so that I can reference the values or how I can reference the values directly?
Thanks
EDIT: I should also add that I’ve tried manually typing {{[module-number].result.value}}, which creates a reference, but the end result is blank.
Thanks so much for bringing this up here and for sharing your findings with the community. We totally appreciate it
I just wanted to jump in with some extra information quickly. Currently, our Math module has the result hardcoded as a simple item. Due to that, even if it changes to a collection, it will still be displayed as a simple item in the mapping panel.
However, using the get () function should do the trick here. Here’s the configuration you’ll want to use:
Can the math module be updated please? Because the workaround that I found, while it works, isn’t good. I have to run this thing on thousands of entries, and that winds up adding a lot of cost.