Panne partielleshare-external
Can the visibility of a field be updated based on the value of another field in a flow?
1

I'm trying to update the visibility of a field based on the value of another field.

What I want to do is that if a customer selects a "burger" field, the "burger2" field disappears and vice versa, but I haven't been able to do it.

This is my json flow and it works to do what I want, the 'burger2' fields disappear when I select 'burger' and vice versa but I get an error in the conditionals "Missing dynamic data "${form.burger2}" in the data model for screen: DEMO_SCREEN, If property: condition.". How can I fix it and keep it working as I expect?

{ "version": "5.0", "data_api_version": "3.0", "routing_model": { "DEMO_SCREEN": [] }, "screens": [ { "id": "DEMO_SCREEN", "terminal": true, "title": "Demo screen", "data": { "all_burgers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "metadata": { "type": "string" } } }, "__example__": [ { "id": "1", "title": "Beef burger", "description": "Beef, red onion relish, lettuce", "metadata": "$9.99" }, { "id": "2", "title": "Chicken burger", "description": "Grilled chicken breast, cheese, buffalo sauce", "metadata": "$10.99" } ] }, "mostrarDropdown": { "type": "boolean", "default": false, "__example__": false } }, "layout": { "type": "SingleColumnLayout", "children": [ { "type": "Form", "name": "text_input_form", "children": [ { "type": "If", "condition": "${form.burger2} == ''", "then": [ { "type": "Dropdown", "name": "burger", "label": "Burgers", "required": true, "visible": true, "data-source": "${data.all_burgers}", "on-select-action": { "name": "data_exchange", "payload": { "burger": "${form.burger}" } } } ] }, { "type": "If", "condition": "${form.burger} == ''", "then": [ { "type": "Dropdown", "name": "burger2", "label": "Burgers2", "required": true, "visible": true, "data-source": "${data.all_burgers}", "on-select-action": { "name": "data_exchange", "payload": { "burger": "${form.burger2}" } } } ] }, { "type": "Footer", "label": "Continue", "on-click-action": { "name": "data_exchange", "payload": {} } } ] } ] } } ] }

Johana
Posée il y a environ 3 mois
Sukhbir

Hi Johana,

Thanks you for reaching out. I can see this is an issue on our side. The fix for this will be landing by EOD tomorrow.

Thanks :)

10 septembre, 05:06
Réponse sélectionnée
1

Hello, have you already corrected the error? to re-validate

12 septembre, 06:49
Johana
1

Hello?

16 septembre, 13:11
Johana