Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Storage Update for Customer Name in Deployed Mode #2798

Open
LukasB0I opened this issue Jan 21, 2025 · 0 comments
Open

Issue with Storage Update for Customer Name in Deployed Mode #2798

LukasB0I opened this issue Jan 21, 2025 · 0 comments

Comments

@LukasB0I
Copy link

Hello, I am encountering an issue in Appsmith where my application works correctly in the production window, but fails in the deployed mode. The issue occurs when using a dropdown select component to fetch customer data.

Problem:
I have a dropdown (select_customer_list) whose data source is select_customer_id.data. The label key is the customer name, and the value key is the customer ID. When an option is selected, I store the selected customer's ID in the storage using the following code:

{{storeValue('selectedKunde', select_customer_list.selectedOptionValue).then(() => {   Select_customer_name4text.run().then(() => {     storeValue('customer_name4text', Select_customer_name4text.data[0].name);   }); })}}   

**Here’s how it works: **
The selected customer ID is saved in the selectedKunde variable. Then, I call Select_customer_name4text, which looks up the customer name in the customer table using the ID. Once the customer name is retrieved, a callback function stores the name in customer_name4text. Finally, my text widget uses customer_name4text to display the customer's name.

**Issue: **
This workflow works as expected in the Production window, but in the deployed mode, the customer_name4text is not being updated correctly. The customer name displays in the modal, but the storage does not update properly in the deployed mode, preventing the text widget from displaying the correct value.

Steps to Reproduce:
In the dropdown (select_customer_list), select a customer (data from select_customer_list.data). The selected customer's ID is saved under selectedKunde. The Select_customer_name4text query is executed to fetch the customer's name. The customer name is saved in customer_name4text. In the Production window, the text widget correctly displays the customer's name from customer_name4text. In the deployed version, the name appears in the modal but does not update the storage, so the text widget does not display the name correctly.

**Expected Behavior: **
The customer name should be stored in customer_name4text and the text widget should display the correct name in both the Production and deployed environments.

**Actual Behavior: **
In the deployed mode, the customer name appears in the modal, but the storage (customer_name4text) does not update correctly, so the text widget does not display the correct name.

Please let me know if you need more details or logs to help troubleshoot this issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant