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
Asked about 2 weeks ago
Selected Answer
3

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

June 25 at 10:09 AM
Evgenii
Selected Answer
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?

June 25 at 2:19 AM
Evgenii
Rohit

This is response while calling on DropDown select

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

June 25 at 2:26 AM
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?

June 25 at 2:28 AM
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}" } } } ] } ] } } ] }

June 25 at 2:31 AM
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

June 25 at 6:19 AM
Rohit

Ok. Thank you for the support.

June 25 at 7:34 AM