DNF-SaS New member Nov 21, 2023 #1 Hi, can anybody give a cURL-example how to fill a multi-value custom thread field using the REST-API? A single value works, but when using multiple values, only the last one get stored. Thanks Sascha
Hi, can anybody give a cURL-example how to fill a multi-value custom thread field using the REST-API? A single value works, but when using multiple values, only the last one get stored. Thanks Sascha
Solution mattrogowski Nov 21, 2023 Would need to end with [] custom_fields[MyField][]=Value1&custom_fields[MyField][]=Value2
K Kirby Well-known member Nov 21, 2023 #2 Untestested Code: custom_fields[fieldname][]=fieldvalue1&custom_fields[fieldname][]=fieldvalue2&custom_fields[fieldname][]=fieldvalue3 Last edited: Nov 21, 2023 Upvote 2 Downvote
Untestested Code: custom_fields[fieldname][]=fieldvalue1&custom_fields[fieldname][]=fieldvalue2&custom_fields[fieldname][]=fieldvalue3
DNF-SaS New member Nov 21, 2023 #3 Kirby said: Untestested Code: fieldname[]=fieldvalue1&fieldname[]=fieldvalue2&fieldname[]=fieldvalue3 Click to expand... Unfortunately, no. Posting custom_fields[MyField]=Value1&custom_fields[MyField]=Value2 results only in Value2. Upvote 0 Downvote
Kirby said: Untestested Code: fieldname[]=fieldvalue1&fieldname[]=fieldvalue2&fieldname[]=fieldvalue3 Click to expand... Unfortunately, no. Posting custom_fields[MyField]=Value1&custom_fields[MyField]=Value2 results only in Value2.
mattrogowski Well-known member Nov 21, 2023 #4 Would need to end with [] custom_fields[MyField][]=Value1&custom_fields[MyField][]=Value2 Upvote 0 Downvote Solution
K Kirby Well-known member Nov 21, 2023 #5 I've updated my post to make it more clear how it was meant Upvote 1 Downvote
DNF-SaS New member Nov 21, 2023 #6 mattrogowski said: Would need to end with [] custom_fields[MyField][]=Value1&custom_fields[MyField][]=Value2 Click to expand... Thats it! Thanks all for the super fast help! Upvote 0 Downvote
mattrogowski said: Would need to end with [] custom_fields[MyField][]=Value1&custom_fields[MyField][]=Value2 Click to expand... Thats it! Thanks all for the super fast help!