Hi WeWeb community, I’m having a difficult time with one particular formula.
Here is the formula—
values(pick(context.item.data,"dob","last_name"))
And here is the corresponding JavaScript—
return wwFormulas.values(wwFormulas.pick(context.item.data,"dob","last_name"))
My goal is to use an array variable in the place of "dob","city"
so I can add or remove keys via other functions and workflows.
Things I’ve tried
Array variable of ["dob","city"]
Text variable of "last_name","dob"
Every time I get the error 0: undefined
.
From what I can decipher, it looks like the core problem is that the formula isn’t detecting that the array is actually an array. Instead, it looks like the array is converted to a string. Here, for example, it seems the values as dob,city
as one key and not separate keys.
Does anyone have a suggestion for achieving the desired functionality? Is some sort of JavaScript loop needed?