Couple of Issues

Wappler 2.7.0, Windows 10

I'm having two problems with updating a Data Store.

Problem 1 - Continuous Messages in Console

When I click on a button which updates a Data Store element, the element is updated okay, but I then get the following continuous message in the console. The message persists if you refresh the page and only ends when you quit the browser and restart it.

infinite

Problem 2 - Some Updates Don't Work

With the same data store, I can update a record from one location in my design but not from another, with identical code.

Here is the code that works ( which is within a repeat block):

<p dmx-on:click="all_contacts.update({id: id},{first_name: 'Jane'})">update ({{id}})</p>

And here is the code that doesn't (which is within a form):

<p dmx-on:click="all_contacts.update({id: h_contact_id.value},{first_name: 'Jane'})">update ({{h_contact_id.value}})</p>

I will PM @Teodor with a link to access the design with the problem.

Best wishes,
Antony.

==============================================
How to re-create:

  1. Log in to app with console open

  2. Click on Contacts on top menu

  3. To set off the console messages, click here:

add_to_list

  1. The Contact List opens on the right. To see the name updated to Jane correctly, click here on that list:

update_works

  1. To see the name not being updated, click on the contact's name in the left pane and a window opens on the right to edit their details. On that window, click as shown below, but nothing happens :frowning: :

update_no

Problem 1 is an invalid expression, you have somewhere Remove from list as an expression, you probably wanted to use it as a static value.

Problem 2 my guess is that h_contact_id.value is a string and id is a number, try using h_contact_id.value.toNumber().

Checked the link @Antony sent me, he's using Remove from list in a tooltip as a static value, but has not wrapped it in single quotes:

dmx-bs-tooltip="Remove from list"

must be

dmx-bs-tooltip="'Remove from list'"

I love you guys. :hugs:

Both solutions work.

Didn’t even have time to make a cup of tea before you had a detailed reply for me.

#bestsupportever

3 Likes