#Update query works in Edit mode not in live mode

1 messages · Page 1 of 1 (latest)

keen karma
#

Hi,

I am on v1.24.1
I have an application that uses Postgres as data source.

I have a query to update records:

UPDATE public."invoice_management" SET
"invoice_customer_full_name" = {{jsf_invoiceManagement.formData.invoice_customer_full_name}},
"invoice_customer_phone" = {{jsf_invoiceManagement.formData.invoice_customer_phone}},
"invoice_customer_email" = {{jsf_invoiceManagement.formData.invoice_customer_email}},
"invoice_value_chf" = {{jsf_invoiceManagement.formData.invoice_value_chf}},
...

WHERE invoice_management_id = {{tbl_invoiceManagement.triggeredRow.invoice_management_id}};

It works fine when I run it in edit mode through the UI.
If I deploy the app and try it in live mode then it does not work.

What could be the reason?

Thanks!

ebon scrollBOT
#

Hey There,

We've registered your query, and our team will get back to you soon.

Regards,
Pranav

#

Hello! I'm Appy, your Appsmith support bot.

It sounds like your query works in edit mode but not in live mode. This issue could be related to how data bindings and permissions are handled differently between the two modes. Here are a few things to check:

  1. Permissions: Ensure that the database query permissions are correctly set for live mode. Sometimes, permissions might be restricted when switching from edit to live mode.

  2. Data Binding: Verify that all bindings in your query (** {?{ jsf_invoiceManagement.formData... }?} ** and ** {?{ tbl_invoiceManagement.triggeredRow... }?} **) are correctly receiving data in live mode. You can debug this by temporarily replacing the bindings with static values to see if the query runs.

  3. Error Handling: Check if there are any error messages being returned from the database or shown in the Appsmith console when you attempt to run the query in live mode.

  4. Widget Names and IDs: Ensure that the widget names and IDs used in your bindings are consistent and haven't been changed inadvertently when moving to live mode.

If these suggestions do not resolve the issue, it might be helpful to look at the specific error messages or logs to further diagnose the problem.

If you don't find my response helpful, you can request to speak to a human agent.

ebon scrollBOT
#

Hello! I'm Amelia with Appsmith Support. ?
Please share the following information to help us debug this issue:

  1. Do you get any errors in the browser's console? If yes please share a screenshot.
  2. Did you use partial import-export to add widgets from another application? If yes, did you rename the query after the import?
keen karma
#

Hi Amelia
2) -> NO

  1. see screenshot please
ebon scrollBOT
#

Hello again! It seems there was an issue with the attachment link you provided, and I'm unable to view the screenshot directly. However, you can describe the issue or error message you see on the screen, and I'll do my best to assist you based on that information.

If you don't find my response helpful, you can request to speak to a human agent.

ebon scrollBOT
#

Please share the following information to help us further debug this issue:

  1. What is your Appsmith version?
  2. Send us a loom.com screen recording showing the exact steps you take and the error in action.
  3. If possible, please share this app with us. Add [email protected] as a Developer and send us the link to it.
keen karma
#

Please let me know if you can access and review.
I have some other issues with this app in relation to how the triggered row is lost when I do certain actions (like using the file picker)

ebon scrollBOT
#

Hello! I'm Appy, your Appsmith support bot.

I'm unable to directly access or review applications, including the Loom video or the Appsmith app you mentioned. However, I can certainly help guide you based on the information you provide here.

Regarding the issue of the triggered row being lost when using actions like the file picker, this could be related to how the state is managed in your application. In Appsmith, the state of a widget (like the selected row in a table) can be lost if the page is re-rendered or if the widget's data source is updated.

To maintain the state across actions, you might consider the following approaches:

  1. Use Store Value: You can use the storeValue function to save the triggered row's data to a temporary state when it is selected, and then retrieve it when needed.
  2. Persistent Widget Properties: Ensure that the widget properties that depend on the triggered row are set up to dynamically reference the stored value.

Here's a basic example of how you might use storeValue to save and retrieve a row's data:

// To store the selected row data
storeValue('selectedRowData', {?{ tbl_invoiceManagement.selectedRow }?} );

// To retrieve the stored row data
{?{ appsmith.store.selectedRowData }?}

Please try implementing a similar pattern and see if it resolves the issue with the triggered row being lost. If you have more specific details or error messages, feel free to share them, and I'll do my best to assist further!

If you don't find my response helpful, you can request to speak to a human agent.

ebon scrollBOT
keen karma
#

Hi
I am now on v1.37, the issue persists

ebon scrollBOT
#

Hello! I'm Appy, your Appsmith support bot.

It's great that you've updated to version 1.37. However, could you please clarify what specific assistance you need with this version? If you have any new issues or if the previous issues persist, please provide more details so I can offer the most relevant support. Thank you!

If you don't find my response helpful, you can request to speak to a human agent.

keen karma
#

Please I would like to speak with a human agent

ebon scrollBOT
#

Someone from our team will reach out to you on this thread. In the meantime, you can have a look at our documentation to try & resolve your query https://docs.appsmith.com?utm=bot

Organizations build internal applications such as dashboards, database GUIs, admin panels, approval apps, customer support tools, etc. to help improve their business operations. Appsmith is an open-source developer tool that enables the rapid development of these applications. You can drag and drop pre-built widgets to build UI. Connect securely...

keen karma
#

Hello, any update on this from human agent?

keen karma
#

Hello, any update on this from human agent?

keen karma
#

Hello, any update on this from human agent?

ebon scrollBOT
#

Hello! Sorry for the delays. You said that you provided us developer access to the app. Could you please share the link of the app so we can further debug it?
Additionally, please send us the server logs by following the steps from this guide on how to get the logs.

keen karma
#

Will try to provide the server logs

keen karma
#

Hi
I have the logs, where should I send them?
Not sure if they contain sensitive info

ebon scrollBOT