#Insert List1 inputs via JS in insertNewEintragWachbuchPerson mysql querry

1 messages · Page 1 of 1 (latest)

lone wing
#

and this errors

17:02:09
ReferenceError:

Text8
:
currentItem is not defined

17:02:09
ReferenceError:

Text6
:
currentItem is not defined

17:02:09
ReferenceError:

Text5
:
currentItem is not defined

#

that are my List1 Text Fields

white crestBOT
#

Hello! I'm AppySmith, your Appsmith support bot, ready to help you with your
platform issues. Let's tackle them one by one. For the issue with your
JavaScript function insertPersonss not returning any data, typically in
Appsmith, when calling .run on an action like
insertNewEintragWachbuchPerson, you may not necessarily get a return value
unless you explicitly handle the response. The function insertPersonss should
return something if you're expecting a result in the UI. If
insertNewEintragWachbuchPerson is an asynchronous server-side action that is
executed without errors, not returning a value in the JavaScript function is
generally okay. Regarding the error you're facing with "currentItem is not defined" in Text8, Text6, and Text5 widgets, this usually indicates that
there's a reference to a variable currentItem in these widgets that hasn't
been defined in the current context. If these widgets are supposed to display
data that is currently selected or iterated over, you need to ensure that the
currentItem object is available in the context where these widgets are being
used. It can happen if you are using currentItem inside a loop but are
referencing it outside the loop or the loop isn't running. For more precise
solutions, I'll need to analyze the exact code that you're working with. Could
you please provide the relevant code snippets or details of how currentItem is
being set and used along with any related context for the insertPersonss
function and Text8, Text6, and Text5 widgets? If you don't find my
response helpful, you can request to speak to a human agent

lone wing
#

Request human to speak

white crestBOT
#

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...

lone wing
#

That is now my Code

export default {
  async insertTest() {
    for (const item of JSObject1.listModel) {
      await insertNewEintragWachbuchPerson.run({ 
        item_name: item.name,
        item_datum_von: item.datum_von + " bis " + item.datum_bis,
        item_id_der_tabelle_wachbuch: item.id_der_tabelle_wachbuch
      });
    }
  }
};
INSERT INTO wachbuch_anwesendheit (vor_zuname, uhrzeit_von_bis, id_der_tabelle_wachbuch) VALUES ({{this.params.item_name}}, {{this.params.item_datum_von}}, {{this.params.item_id_der_tabelle_wachbuch}});

When I execute the function. Nothing happen.