Custom Action - Blank Result

Hello All

The custom action works however when I attempt to a field to a collection it is blank.

Hope somebody can help

This should be the magic text you use in your Create Message action
image

You are referencing the returned “Model”

Rizza

Regardless whether I reference model or anything else it should not be blank.

I would check the browser inspector, see what the api response is there. When previewing.

1 Like

Hi @dominiconorton,

Usually when a custom action works in the test mode, but doesn’t work in the app means that something in the payload stops this action from being executed correctly.

When you try to debug such issues, the easiest thing to start from is to put plaintext values to the action’s parameters in the app. E.g. instead of putting magic text into Tone Type, etc. you just type in the values in a plain text and run this action in a previewer.
Ideally you start with the same values like you’ve put in the custom action settings to test the action. Then you have 2 outcomes:

  1. The action works fine with hardcoded values. Here you can start changing values from hardcoded to magic text one by one (or replacing hardcoded values with other ones - I doubt that you put all this long message text in the action setup).
    At some point of time you may find what is causing the action to fail.
  2. The action doesn’t work with hardcoded values. Then it’s something related to action’s settings. To investigate further, you will need to look at browser debug console.

By the way, as Rozza mentioned, you can start from looking at a browser console while you’re testing the action. So what you need to do:

  • launch the previewer and open the screen with a custom action on it
  • launch console (In Chrome for Mac, it is located in View → Developer → JavaScript Console)
  • go to Network tab
  • clear Network log (there is an icon on the left, in my console it’s second from the left)
  • then press a button to execute the action.
    You will see network calls with “execute” in it (I think there should be 2 of them). By inspecting each of them (clicking on a call will result in opening its details), you may see what was sent and what reply was received from Adalo’s backend.

Hope this helps.

Best,
Victor.

1 Like

Thank you @Victor

Here’s what I did:

  1. Deleted every input component
  2. Replaced them with static text components
  3. Tested with the same inputs as in the test request
  4. Replaced the input components with dropdowns, one by one, testing each after replacement.

There was likely an error with one of the components impacting the payload.

1 Like

Hi @dominiconorton,

Great that you solved it! Sometimes Adalo is a bit glitchy :slight_smile:

Best,
Victor.

1 Like