Partial Outageshare-external
Error Whatsapp Flow 4.0 - Following fields are expected in the next screen's data model but missing in payload
1

Following fields are expected in the next screen's data model but missing in payload.

I get the above error when trying to reference a newly created data model in the 2nd / 3rd layout etc

Can replicate with this

```{ "version": "4.0", "screens": [ { "data": {

  },
  "id": "SCREEN_ONE",
  "layout": {
    "type": "SingleColumnLayout",
    "children": [
      {
        "type": "TextInput",
        "name": "field1",
        "label": "Enter your name"
      },
      {
        "type": "Footer",
        "label": "CTA",
        "on-click-action": {
          "name": "navigate",
          "next": {
            "type": "screen",
            "name": "SCREEN_TWO"
          },
          "payload": {}
        }
      }
    ]
  },
  "title": "Screen 1"
},
{
  "id": "SCREEN_TWO",
  "terminal": true,
  "layout": {
    "type": "SingleColumnLayout",
    "children": [
      {
        "type": "Footer",
        "label": "Complete",
        "on-click-action": {
          "name": "complete",
          "payload": {
            "field1": "${screen.SCREEN_ONE.form.field1}",
            "field2": "${data.field2}"
          }
        }
      }
    ]
  },
  "title": "Screen 2",
  "data": {
      "field2": {
      "type": "string",
      "__example__": "data"
    }
    }
}

] }```

I think this is a bug

Jake
Asked about 5 months ago
Selected Answer
1

Hi Jake, As I can see in the Flow JSON you are trying to navigate from SCREEN1 → SCREEN2 with out any payload but your SCREEN2 expects "field2" to be passed. Try adding "feild2" to SCREEN1 footer on-click-action payload. That will solve your issue.

July 1 at 12:26 PM
Sai