Null values display previously retrieved values

Previously reported:

Wappler Version : 3.8.3
Operating System : mac
Server Model: node

Expected behavior

When making multiple calls to a server connect and displaying those results, any and all data previously retrieved should be removed, and replaced only with current data results.

Actual behavior

Columns that have data on the first call, but are null on the second, display the data from the first call

How to reproduce

Create a server connect that will potentially return null values for some data:

First call:
Screen Shot 2021-03-16 at 8.53.52 AM

Second call (aisle and possibleUnits now null):
Screen Shot 2021-03-16 at 8.54.06 AM

Display these results in a table and notice that the values from aisle and possibleUnits are retained.

Note that using .default(’’) as provided in the previously reported bug does not work here.

This should have been improved in a few versions back. What are you diaplaing on the page exactly?

                            <tbody is="dmx-repeat" dmx-generator="bs4table" dmx-bind:repeat="spoonacular_api.data.ingredients_search.data.results" id="tableRepeat3">
                                <tr dmx-on:click="browser1.goto('/spoonacular_ingredient/'+id,true)" style="cursor: pointer;">
                                    <td dmx-text="id"></td>
                                    <td dmx-text="name"></td>
                                    <td><img dmx-bind:src="'https://spoonacular.com/cdn/ingredients_100x100/'+image" width="100px"></td>
                                    <td dmx-text="aisle"></td>
                                    <td dmx-text="possibleUnits"></td>
                                </tr>
                            </tbody>

From what I remember, this has been an issue since forever. I had a long discussion with Teodor I think more than an year ago.
This was said to be improved in one the recent updates, as Teodor pointed, but even in our experience, it did not.

So, as a workaround, we used another one of new options in recent updates - server connect reset.
For example, on click of button which loads the server connect with fresh data:
sc1.reset();sc1.load()
You could also do the reset part on start of a SC I think. Haven’t tried myself.

1 Like