Hello,
I used Forms to create profile data form after first login. The only part I’m struggling is how I cant store with the Flow Update profile into an array.
In the form I have three steps every step allows to store information for one child with name, gender and birthdate.
I want to store it in the user_metadata like this:
"user_metadata": {
"children": [
{
"first_name": "Luca",
"last_name": "Mustermann",
"gender": "m",
"birthdate": "2018-05-12"
},
{
"first_name": "Sophie",
"last_name": "Mustermann",
"gender": "f",
"birthdate": "2019-10-07"
}
],`...``
I tried different ways and also the merge helper function but at the end I always have only the last entry in the profile.
{
"children": [
{},
{},
{
"gender": "Unknown",
"birthdate": "2025-05-30",
"last_name": "Ranseier",
"first_name": "Karl"
}
],
Last try was this mapping which results in data above, so what I see is that the form data could be lost.
{
"user_metadata": {
"children": [
{
"gender": "{{fields.child1_gender}}",
"birthdate": "{{fields.child1_birthdate}}",
"last_name": "{{fields.child1_last_name}}",
"first_name": "{{fields.child1_first_name}}"
},
{
"gender": "{{fields.child2_gender}}",
"birthdate": "{{fields.child2_birthdate}}",
"last_name": "{{fields.child2_last_name}}",
"first_name": "{{fields.child2_first_name}}"
},
{
"gender": "{{fields.child3_gender}}",
"birthdate": "{{fields.child3_birthdate}}",
"last_name": "{{fields.child3_last_name}}",
"first_name": "{{fields.child3_first_name}}"
}
]
}
}
What I expected the merge the array or adding only one will work:
{
"user_metadata": {
"children": [
{
"gender": "{{fields.child1_gender}}",
"birthdate": "{{fields.child1_birthdate}}",
"last_name": "{{fields.child1_last_name}}",
"first_name": "{{fields.child1_first_name}}"
}
]
}
}
Where I’m getting wrong?