Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Confiforms form data from webservice request

Demolag
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2025

Here's my specific scenario:

  • I have Form F with field f: webservice dropdown field
  • I have Form P with field p
  • f's webservice request returns JSON data like:
{ 
'key': 'f1',
'label':'fl1',
'items':[
{'key':'p1', 'label':'pl1'},
{...},
...
]
}

Is there a way to automatically populate Form P using the items array from field f when registering rows on Form F?

I considered IFTTT, but its "create entry" action only allows creating one row per rule execution, which isn't ideal for my use case.

Any suggestions would be greatly appreciated. Thanks!

 

Edit: While p ideal field type would be webservice dropdown, if it's not possible, even type text that contain only the key from each item would be helpful.

1 answer

0 votes
Demolag
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2025

I think I found a trick solution:

  1. Add to F a field temp of type multi-select
  2. Set to Text Field
  3. IFTTT1: CreateEntry on F:
    • Params: entryId=[entry.id]&temp=[entry.f.items.key.asList]
  4. IFTTT2: Copy Entries from F to P:
    • Params: p=[entry.temp]
    • Flatten: True
    • Flatten By Field: temp

It works, but I'll be happy for a more clean solution.

Alex Medved _ConfiForms_
Community Champion
August 5, 2025

If you want to copy a flattened values from a multi-value field then this will be the correct approach

Demolag
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2025

Is there no way to skip the first part and flatten it directly based on f.items?

Alex Medved _ConfiForms_
Community Champion
August 5, 2025

You cannot flatten by the field in another form, so it needs to be copied locally from the [entry.f.items.asList]

Like Demolag likes this
Demolag
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2025

Followup question:
On the solution above, only the key is passed to the 2nd form.
Now I've realized that I need the other fields as well.
Is there a way to do populate it to contains all of the fields?

I've tried to do the same way but with the whole inner json for each of the items, but the multi-select field see the comma between the json parameters as part of the lists, so instead of getting:

  • {'key':'p1', 'label':'pl1'}
  • {'key':'p2', 'label':'pl2'}

I get:

  • {'key':''p1
  • 'label':'pl1'}
  • {'key':'p2'
  • 'label':'pl2'}

and the 2nd form get new 4 entries instead of 2.

Tried also to reference the original 1st form entry with a smart-field, and to get the info using: [entry.fRef.f.items.(key=[entry.p])], but it seems that the JSON field value match does not support referencing entry values.

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events