APIs & Integrations

JamesR_INT
参加者 | Gold Partner
参加者 | Gold Partner

Serverless Functions & Forms

Hey all! 

I'm testing some of the possibilities of Serverless Functions and I've hit a wall on a particular test project. What I'd like to do is to create a form on the custom tab of the Company CRM and I've done that. One example is I have a form attached to a button. The form contains a checkboxList of options which each have a pre-assigned value attached to them. 

What I'd like to do is to take the selected boxes' values as an input from the user and USE it in a serverless function, possibly using the inputs as values inside an API call, for example. Would this or anything like this be remotely possible?

I've setup the mock environment but what I've found is that I'm able to display the values selected by the user but I've been unable to "send" them anywhere. If I set the value of the input to be sent via the "properiesToSend", I receive a null/empty value in my logs when it reaches the Serverless Function on the receiving end. 

This isn't the only thing I've tried, but just an example of the concept I'd be trying to achieve:

{
                    type: "form",
                    content: [
                        {
                            type: "toggleGroup",
                            toggleType: "checkboxList",
                            name: "selected_fruits",
                            label: "Select any Fruits",
                            options: fruits
                        },
                        {
                            type: "button",
                            text: "Create Order",
                            onClick: {
                                type: "SUBMIT",
                                serverlessFunction: "createOrder",
                                propertiesToSend: { fruits },
                                notification: {
                                    type: 'success',
                                    message: 'Order created successfully!'
                                }
                            }
                        }                  
                    ]
                }



I'm still learning and I'm happy to take any advice/tips on the matter. Thank you in advance for any replies!

0 いいね!
1件の返信
Jaycee_Lewis
コミュニティーマネージャー
コミュニティーマネージャー

Serverless Functions & Forms

Hey, @JamesR_INT 👋 Thanks for the interesting question. Were you able to make any progress?

 

This is definitely an area that I am learning too. Have you tried sending propertiesToSend like this?

"propertiesToSend": ["selected_fruits"],

So that it is sent as dynamic data and not an array.

 

If that fails, please let us know, and we'll see if any of our wizards have a suggestion 😊

 

Best,

Jaycee

 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 いいね!