Getting value populate issue some time with init_values
0

Hi.

Scenario:

DropDown-1 is dynamic and request to server to fetch customer phone, When first time selecting option from Dropdown-1 Customer Phone Response getting populate in below textinput feild, But if choose dropdown multiple times value not getting change.

please help, Thank in Advance.

Regards Ankit

Rohit
Ditanyakan sekitar 3 bulan yang lalu
Jawaban yang Dipilih
3

Rohit, The issue has been identified and the fix is landing. It should be available in 24 hours,

25 Juni pukul 10.09
Evgenii
Jawaban yang Dipilih
1

Hi Rohit, to help you with the issue, could you please provide a Flow JSON and Server response example for the case when you select a dropdown?

25 Juni pukul 02.19
Evgenii
Rohit

This is response while calling on DropDown select

{ "data": { "init_values": { "input_6": "9999999999" } }, "screen": "SMART_INVOICINGS", "version": "3.0" }

25 Juni pukul 02.26
Rohit

Problem is if first time i choose customer from drop down... Phone number getting populate correctly, but if i change customer from dropdown then not getting change, but again if i change customer then populate last selected customer's phone.

Got it?

25 Juni pukul 02.28
Rohit

I missed routing in earlier comment please consider this flow payload

{ "version": "4.0", "data_api_version": "3.0", "routing_model": {"SMART_INVOICING":[]}, "screens": [ { "id": "SMART_INVOICING", "title": "${data.title}", "terminal": true, "refresh_on_back": true, "data": { "title": { "type": "string", "example": "Smart Invoicing" }, "init_values": { "type": "object", "example": {} }, "error_messages": { "type": "object", "example": {} }, "dropdown_1_data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "metadata": { "type": "string" } } }, "example": [] } }, "layout": { "type": "SingleColumnLayout", "children": [ { "type": "Form", "name": "form", "error-messages": "${data.error_messages}", "init-values": "${data.init_values}", "children": [ { "type": "Dropdown", "name": "dropdown_1", "label": "Choose Customer", "data-source": "${data.dropdown_1_data}", "on-select-action": { "name": "data_exchange", "payload": { "data_action": "dropdown_1_action", "dropdown_1": "${form.dropdown_1}" } } }, { "type": "TextInput", "name": "input_6", "label": "Customer Phone", "input-type": "phone" }, { "type": "Footer", "label": "Submit", "on-click-action": { "name": "complete", "payload": { "data_action": "submitted", "dropdown_1": "${form.dropdown_1}", "input_6": "${form.input_6}" } } } ] } ] } } ] }

25 Juni pukul 02.31
Evgenii

Rohit, I'm confirming the issue. The problem is that init_values is the same every time you select value from Dropdown. The way it works at the moment, we cache the value returned from server and don't trigger the UI update unless init_value changes.

I believe we can get it resolved by the end of the week, I'll post an update in this thread

25 Juni pukul 06.19
Rohit

Ok. Thank you for the support.

25 Juni pukul 07.34